2024-03-17 18:28:54 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package environments
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
// EnvironmentsClient is the client API for Environments service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type EnvironmentsClient interface {
2024-04-29 09:26:20 +00:00
Create ( ctx context . Context , in * CreateOptions , opts ... grpc . CallOption ) ( * EnvironmentFull , error )
Update ( ctx context . Context , in * UpdateOptions , opts ... grpc . CallOption ) ( * EnvironmentFull , error )
Delete ( ctx context . Context , in * DeleteOptions , opts ... grpc . CallOption ) ( * emptypb . Empty , error )
Get ( ctx context . Context , in * GetOptions , opts ... grpc . CallOption ) ( * EnvironmentFull , error )
List ( ctx context . Context , in * ListOptions , opts ... grpc . CallOption ) ( Environments_ListClient , error )
2024-03-17 18:28:54 +00:00
}
type environmentsClient struct {
cc grpc . ClientConnInterface
}
func NewEnvironmentsClient ( cc grpc . ClientConnInterface ) EnvironmentsClient {
return & environmentsClient { cc }
}
2024-04-29 09:26:20 +00:00
func ( c * environmentsClient ) Create ( ctx context . Context , in * CreateOptions , opts ... grpc . CallOption ) ( * EnvironmentFull , error ) {
2024-03-17 18:28:54 +00:00
out := new ( EnvironmentFull )
err := c . cc . Invoke ( ctx , "/environments.Environments/Create" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-04-29 09:26:20 +00:00
func ( c * environmentsClient ) Update ( ctx context . Context , in * UpdateOptions , opts ... grpc . CallOption ) ( * EnvironmentFull , error ) {
2024-03-17 18:28:54 +00:00
out := new ( EnvironmentFull )
err := c . cc . Invoke ( ctx , "/environments.Environments/Update" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-04-29 09:26:20 +00:00
func ( c * environmentsClient ) Delete ( ctx context . Context , in * DeleteOptions , opts ... grpc . CallOption ) ( * emptypb . Empty , error ) {
2024-03-17 18:28:54 +00:00
out := new ( emptypb . Empty )
err := c . cc . Invoke ( ctx , "/environments.Environments/Delete" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-04-29 09:26:20 +00:00
func ( c * environmentsClient ) Get ( ctx context . Context , in * GetOptions , opts ... grpc . CallOption ) ( * EnvironmentFull , error ) {
2024-03-17 18:28:54 +00:00
out := new ( EnvironmentFull )
err := c . cc . Invoke ( ctx , "/environments.Environments/Get" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-04-29 09:26:20 +00:00
func ( c * environmentsClient ) List ( ctx context . Context , in * ListOptions , opts ... grpc . CallOption ) ( Environments_ListClient , error ) {
2024-03-17 18:28:54 +00:00
stream , err := c . cc . NewStream ( ctx , & Environments_ServiceDesc . Streams [ 0 ] , "/environments.Environments/List" , opts ... )
if err != nil {
return nil , err
}
x := & environmentsListClient { stream }
if err := x . ClientStream . SendMsg ( in ) ; err != nil {
return nil , err
}
if err := x . ClientStream . CloseSend ( ) ; err != nil {
return nil , err
}
return x , nil
}
type Environments_ListClient interface {
2024-04-29 09:26:20 +00:00
Recv ( ) ( * EnvironmentFull , error )
2024-03-17 18:28:54 +00:00
grpc . ClientStream
}
type environmentsListClient struct {
grpc . ClientStream
}
2024-04-29 09:26:20 +00:00
func ( x * environmentsListClient ) Recv ( ) ( * EnvironmentFull , error ) {
m := new ( EnvironmentFull )
2024-03-17 18:28:54 +00:00
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
// EnvironmentsServer is the server API for Environments service.
// All implementations must embed UnimplementedEnvironmentsServer
// for forward compatibility
type EnvironmentsServer interface {
2024-04-29 09:26:20 +00:00
Create ( context . Context , * CreateOptions ) ( * EnvironmentFull , error )
Update ( context . Context , * UpdateOptions ) ( * EnvironmentFull , error )
Delete ( context . Context , * DeleteOptions ) ( * emptypb . Empty , error )
Get ( context . Context , * GetOptions ) ( * EnvironmentFull , error )
List ( * ListOptions , Environments_ListServer ) error
2024-03-17 18:28:54 +00:00
mustEmbedUnimplementedEnvironmentsServer ( )
}
// UnimplementedEnvironmentsServer must be embedded to have forward compatible implementations.
type UnimplementedEnvironmentsServer struct {
}
2024-04-29 09:26:20 +00:00
func ( UnimplementedEnvironmentsServer ) Create ( context . Context , * CreateOptions ) ( * EnvironmentFull , error ) {
2024-03-17 18:28:54 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method Create not implemented" )
}
2024-04-29 09:26:20 +00:00
func ( UnimplementedEnvironmentsServer ) Update ( context . Context , * UpdateOptions ) ( * EnvironmentFull , error ) {
2024-03-17 18:28:54 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method Update not implemented" )
}
2024-04-29 09:26:20 +00:00
func ( UnimplementedEnvironmentsServer ) Delete ( context . Context , * DeleteOptions ) ( * emptypb . Empty , error ) {
2024-03-17 18:28:54 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method Delete not implemented" )
}
2024-04-29 09:26:20 +00:00
func ( UnimplementedEnvironmentsServer ) Get ( context . Context , * GetOptions ) ( * EnvironmentFull , error ) {
2024-03-17 18:28:54 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method Get not implemented" )
}
2024-04-29 09:26:20 +00:00
func ( UnimplementedEnvironmentsServer ) List ( * ListOptions , Environments_ListServer ) error {
2024-03-17 18:28:54 +00:00
return status . Errorf ( codes . Unimplemented , "method List not implemented" )
}
func ( UnimplementedEnvironmentsServer ) mustEmbedUnimplementedEnvironmentsServer ( ) { }
// UnsafeEnvironmentsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EnvironmentsServer will
// result in compilation errors.
type UnsafeEnvironmentsServer interface {
mustEmbedUnimplementedEnvironmentsServer ( )
}
func RegisterEnvironmentsServer ( s grpc . ServiceRegistrar , srv EnvironmentsServer ) {
s . RegisterService ( & Environments_ServiceDesc , srv )
}
func _Environments_Create_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
in := new ( CreateOptions )
2024-03-17 18:28:54 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( EnvironmentsServer ) . Create ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/environments.Environments/Create" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
return srv . ( EnvironmentsServer ) . Create ( ctx , req . ( * CreateOptions ) )
2024-03-17 18:28:54 +00:00
}
return interceptor ( ctx , in , info , handler )
}
func _Environments_Update_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
in := new ( UpdateOptions )
2024-03-17 18:28:54 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( EnvironmentsServer ) . Update ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/environments.Environments/Update" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
return srv . ( EnvironmentsServer ) . Update ( ctx , req . ( * UpdateOptions ) )
2024-03-17 18:28:54 +00:00
}
return interceptor ( ctx , in , info , handler )
}
func _Environments_Delete_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
in := new ( DeleteOptions )
2024-03-17 18:28:54 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( EnvironmentsServer ) . Delete ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/environments.Environments/Delete" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
return srv . ( EnvironmentsServer ) . Delete ( ctx , req . ( * DeleteOptions ) )
2024-03-17 18:28:54 +00:00
}
return interceptor ( ctx , in , info , handler )
}
func _Environments_Get_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
in := new ( GetOptions )
2024-03-17 18:28:54 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( EnvironmentsServer ) . Get ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/environments.Environments/Get" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-04-29 09:26:20 +00:00
return srv . ( EnvironmentsServer ) . Get ( ctx , req . ( * GetOptions ) )
2024-03-17 18:28:54 +00:00
}
return interceptor ( ctx , in , info , handler )
}
func _Environments_List_Handler ( srv interface { } , stream grpc . ServerStream ) error {
2024-04-29 09:26:20 +00:00
m := new ( ListOptions )
2024-03-17 18:28:54 +00:00
if err := stream . RecvMsg ( m ) ; err != nil {
return err
}
return srv . ( EnvironmentsServer ) . List ( m , & environmentsListServer { stream } )
}
type Environments_ListServer interface {
2024-04-29 09:26:20 +00:00
Send ( * EnvironmentFull ) error
2024-03-17 18:28:54 +00:00
grpc . ServerStream
}
type environmentsListServer struct {
grpc . ServerStream
}
2024-04-29 09:26:20 +00:00
func ( x * environmentsListServer ) Send ( m * EnvironmentFull ) error {
2024-03-17 18:28:54 +00:00
return x . ServerStream . SendMsg ( m )
}
// Environments_ServiceDesc is the grpc.ServiceDesc for Environments service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Environments_ServiceDesc = grpc . ServiceDesc {
ServiceName : "environments.Environments" ,
HandlerType : ( * EnvironmentsServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Create" ,
Handler : _Environments_Create_Handler ,
} ,
{
MethodName : "Update" ,
Handler : _Environments_Update_Handler ,
} ,
{
MethodName : "Delete" ,
Handler : _Environments_Delete_Handler ,
} ,
{
MethodName : "Get" ,
Handler : _Environments_Get_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc {
{
StreamName : "List" ,
Handler : _Environments_List_Handler ,
ServerStreams : true ,
} ,
} ,
2024-03-18 10:15:28 +00:00
Metadata : "environments/environments_v1.proto" ,
2024-03-17 18:28:54 +00:00
}