Update the env proto

This commit is contained in:
Nikolai Rodionov 2024-04-29 11:26:20 +02:00
parent 9a5cf66857
commit e7721e4317
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
3 changed files with 788 additions and 196 deletions

File diff suppressed because it is too large Load Diff

View File

@ -19,11 +19,11 @@ const _ = grpc.SupportPackageIsVersion7
//
// 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 {
Create(ctx context.Context, in *EnvironmentData, opts ...grpc.CallOption) (*EnvironmentFull, error)
Update(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*EnvironmentFull, error)
Delete(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*emptypb.Empty, error)
Get(ctx context.Context, in *EnvironmentName, opts ...grpc.CallOption) (*EnvironmentFull, error)
List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Environments_ListClient, error)
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)
}
type environmentsClient struct {
@ -34,7 +34,7 @@ func NewEnvironmentsClient(cc grpc.ClientConnInterface) EnvironmentsClient {
return &environmentsClient{cc}
}
func (c *environmentsClient) Create(ctx context.Context, in *EnvironmentData, opts ...grpc.CallOption) (*EnvironmentFull, error) {
func (c *environmentsClient) Create(ctx context.Context, in *CreateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, "/environments.Environments/Create", in, out, opts...)
if err != nil {
@ -43,7 +43,7 @@ func (c *environmentsClient) Create(ctx context.Context, in *EnvironmentData, op
return out, nil
}
func (c *environmentsClient) Update(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*EnvironmentFull, error) {
func (c *environmentsClient) Update(ctx context.Context, in *UpdateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, "/environments.Environments/Update", in, out, opts...)
if err != nil {
@ -52,7 +52,7 @@ func (c *environmentsClient) Update(ctx context.Context, in *EnvironmentFull, op
return out, nil
}
func (c *environmentsClient) Delete(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*emptypb.Empty, error) {
func (c *environmentsClient) Delete(ctx context.Context, in *DeleteOptions, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/environments.Environments/Delete", in, out, opts...)
if err != nil {
@ -61,7 +61,7 @@ func (c *environmentsClient) Delete(ctx context.Context, in *EnvironmentFull, op
return out, nil
}
func (c *environmentsClient) Get(ctx context.Context, in *EnvironmentName, opts ...grpc.CallOption) (*EnvironmentFull, error) {
func (c *environmentsClient) Get(ctx context.Context, in *GetOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, "/environments.Environments/Get", in, out, opts...)
if err != nil {
@ -70,7 +70,7 @@ func (c *environmentsClient) Get(ctx context.Context, in *EnvironmentName, opts
return out, nil
}
func (c *environmentsClient) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Environments_ListClient, error) {
func (c *environmentsClient) List(ctx context.Context, in *ListOptions, opts ...grpc.CallOption) (Environments_ListClient, error) {
stream, err := c.cc.NewStream(ctx, &Environments_ServiceDesc.Streams[0], "/environments.Environments/List", opts...)
if err != nil {
return nil, err
@ -86,7 +86,7 @@ func (c *environmentsClient) List(ctx context.Context, in *emptypb.Empty, opts .
}
type Environments_ListClient interface {
Recv() (*EnvironmentName, error)
Recv() (*EnvironmentFull, error)
grpc.ClientStream
}
@ -94,8 +94,8 @@ type environmentsListClient struct {
grpc.ClientStream
}
func (x *environmentsListClient) Recv() (*EnvironmentName, error) {
m := new(EnvironmentName)
func (x *environmentsListClient) Recv() (*EnvironmentFull, error) {
m := new(EnvironmentFull)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
@ -106,11 +106,11 @@ func (x *environmentsListClient) Recv() (*EnvironmentName, error) {
// All implementations must embed UnimplementedEnvironmentsServer
// for forward compatibility
type EnvironmentsServer interface {
Create(context.Context, *EnvironmentData) (*EnvironmentFull, error)
Update(context.Context, *EnvironmentFull) (*EnvironmentFull, error)
Delete(context.Context, *EnvironmentFull) (*emptypb.Empty, error)
Get(context.Context, *EnvironmentName) (*EnvironmentFull, error)
List(*emptypb.Empty, Environments_ListServer) error
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
mustEmbedUnimplementedEnvironmentsServer()
}
@ -118,19 +118,19 @@ type EnvironmentsServer interface {
type UnimplementedEnvironmentsServer struct {
}
func (UnimplementedEnvironmentsServer) Create(context.Context, *EnvironmentData) (*EnvironmentFull, error) {
func (UnimplementedEnvironmentsServer) Create(context.Context, *CreateOptions) (*EnvironmentFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedEnvironmentsServer) Update(context.Context, *EnvironmentFull) (*EnvironmentFull, error) {
func (UnimplementedEnvironmentsServer) Update(context.Context, *UpdateOptions) (*EnvironmentFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedEnvironmentsServer) Delete(context.Context, *EnvironmentFull) (*emptypb.Empty, error) {
func (UnimplementedEnvironmentsServer) Delete(context.Context, *DeleteOptions) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedEnvironmentsServer) Get(context.Context, *EnvironmentName) (*EnvironmentFull, error) {
func (UnimplementedEnvironmentsServer) Get(context.Context, *GetOptions) (*EnvironmentFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedEnvironmentsServer) List(*emptypb.Empty, Environments_ListServer) error {
func (UnimplementedEnvironmentsServer) List(*ListOptions, Environments_ListServer) error {
return status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedEnvironmentsServer) mustEmbedUnimplementedEnvironmentsServer() {}
@ -147,7 +147,7 @@ func RegisterEnvironmentsServer(s grpc.ServiceRegistrar, srv EnvironmentsServer)
}
func _Environments_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentData)
in := new(CreateOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -159,13 +159,13 @@ func _Environments_Create_Handler(srv interface{}, ctx context.Context, dec func
FullMethod: "/environments.Environments/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Create(ctx, req.(*EnvironmentData))
return srv.(EnvironmentsServer).Create(ctx, req.(*CreateOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentFull)
in := new(UpdateOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -177,13 +177,13 @@ func _Environments_Update_Handler(srv interface{}, ctx context.Context, dec func
FullMethod: "/environments.Environments/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Update(ctx, req.(*EnvironmentFull))
return srv.(EnvironmentsServer).Update(ctx, req.(*UpdateOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentFull)
in := new(DeleteOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -195,13 +195,13 @@ func _Environments_Delete_Handler(srv interface{}, ctx context.Context, dec func
FullMethod: "/environments.Environments/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Delete(ctx, req.(*EnvironmentFull))
return srv.(EnvironmentsServer).Delete(ctx, req.(*DeleteOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentName)
in := new(GetOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -213,13 +213,13 @@ func _Environments_Get_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: "/environments.Environments/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Get(ctx, req.(*EnvironmentName))
return srv.(EnvironmentsServer).Get(ctx, req.(*GetOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_List_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(emptypb.Empty)
m := new(ListOptions)
if err := stream.RecvMsg(m); err != nil {
return err
}
@ -227,7 +227,7 @@ func _Environments_List_Handler(srv interface{}, stream grpc.ServerStream) error
}
type Environments_ListServer interface {
Send(*EnvironmentName) error
Send(*EnvironmentFull) error
grpc.ServerStream
}
@ -235,7 +235,7 @@ type environmentsListServer struct {
grpc.ServerStream
}
func (x *environmentsListServer) Send(m *EnvironmentName) error {
func (x *environmentsListServer) Send(m *EnvironmentFull) error {
return x.ServerStream.SendMsg(m)
}

2
proto

@ -1 +1 @@
Subproject commit a71f2b7cb57ff0e1dfa81aee4a8732c9316a5509
Subproject commit 1c1bb4672b6e32510c419498c721e552443d9418