Denis Kirillov
42862fd69e
All checks were successful
/ Vulncheck (pull_request) Successful in 3m20s
/ DCO (pull_request) Successful in 3m56s
/ Builds (1.20) (pull_request) Successful in 4m13s
/ Builds (1.21) (pull_request) Successful in 4m9s
/ Lint (pull_request) Successful in 3m9s
/ Tests (1.20) (pull_request) Successful in 4m14s
/ Tests (1.21) (pull_request) Successful in 3m59s
Add PutPolicies, RemovePolicies, GetPolicy, ListPolicies methods Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
249 lines
9.6 KiB
Go
249 lines
9.6 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.9
|
|
// source: pkg/service/control/service.proto
|
|
|
|
package control
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// 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
|
|
|
|
// ControlServiceClient is the client API for ControlService 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 ControlServiceClient interface {
|
|
// Performs health check of the storage node.
|
|
HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
|
|
PutPolicies(ctx context.Context, in *PutPoliciesRequest, opts ...grpc.CallOption) (*PutPoliciesResponse, error)
|
|
RemovePolicies(ctx context.Context, in *RemovePoliciesRequest, opts ...grpc.CallOption) (*RemovePoliciesResponse, error)
|
|
GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error)
|
|
ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error)
|
|
}
|
|
|
|
type controlServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewControlServiceClient(cc grpc.ClientConnInterface) ControlServiceClient {
|
|
return &controlServiceClient{cc}
|
|
}
|
|
|
|
func (c *controlServiceClient) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
|
|
out := new(HealthCheckResponse)
|
|
err := c.cc.Invoke(ctx, "/s3gw.control.ControlService/HealthCheck", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlServiceClient) PutPolicies(ctx context.Context, in *PutPoliciesRequest, opts ...grpc.CallOption) (*PutPoliciesResponse, error) {
|
|
out := new(PutPoliciesResponse)
|
|
err := c.cc.Invoke(ctx, "/s3gw.control.ControlService/PutPolicies", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlServiceClient) RemovePolicies(ctx context.Context, in *RemovePoliciesRequest, opts ...grpc.CallOption) (*RemovePoliciesResponse, error) {
|
|
out := new(RemovePoliciesResponse)
|
|
err := c.cc.Invoke(ctx, "/s3gw.control.ControlService/RemovePolicies", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlServiceClient) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) {
|
|
out := new(GetPolicyResponse)
|
|
err := c.cc.Invoke(ctx, "/s3gw.control.ControlService/GetPolicy", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlServiceClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) {
|
|
out := new(ListPoliciesResponse)
|
|
err := c.cc.Invoke(ctx, "/s3gw.control.ControlService/ListPolicies", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ControlServiceServer is the server API for ControlService service.
|
|
// All implementations should embed UnimplementedControlServiceServer
|
|
// for forward compatibility
|
|
type ControlServiceServer interface {
|
|
// Performs health check of the storage node.
|
|
HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
|
|
PutPolicies(context.Context, *PutPoliciesRequest) (*PutPoliciesResponse, error)
|
|
RemovePolicies(context.Context, *RemovePoliciesRequest) (*RemovePoliciesResponse, error)
|
|
GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error)
|
|
ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error)
|
|
}
|
|
|
|
// UnimplementedControlServiceServer should be embedded to have forward compatible implementations.
|
|
type UnimplementedControlServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedControlServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")
|
|
}
|
|
func (UnimplementedControlServiceServer) PutPolicies(context.Context, *PutPoliciesRequest) (*PutPoliciesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PutPolicies not implemented")
|
|
}
|
|
func (UnimplementedControlServiceServer) RemovePolicies(context.Context, *RemovePoliciesRequest) (*RemovePoliciesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RemovePolicies not implemented")
|
|
}
|
|
func (UnimplementedControlServiceServer) GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetPolicy not implemented")
|
|
}
|
|
func (UnimplementedControlServiceServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListPolicies not implemented")
|
|
}
|
|
|
|
// UnsafeControlServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ControlServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeControlServiceServer interface {
|
|
mustEmbedUnimplementedControlServiceServer()
|
|
}
|
|
|
|
func RegisterControlServiceServer(s grpc.ServiceRegistrar, srv ControlServiceServer) {
|
|
s.RegisterService(&ControlService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ControlService_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(HealthCheckRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServiceServer).HealthCheck(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/s3gw.control.ControlService/HealthCheck",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServiceServer).HealthCheck(ctx, req.(*HealthCheckRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ControlService_PutPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PutPoliciesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServiceServer).PutPolicies(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/s3gw.control.ControlService/PutPolicies",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServiceServer).PutPolicies(ctx, req.(*PutPoliciesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ControlService_RemovePolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RemovePoliciesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServiceServer).RemovePolicies(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/s3gw.control.ControlService/RemovePolicies",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServiceServer).RemovePolicies(ctx, req.(*RemovePoliciesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ControlService_GetPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetPolicyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServiceServer).GetPolicy(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/s3gw.control.ControlService/GetPolicy",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServiceServer).GetPolicy(ctx, req.(*GetPolicyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ControlService_ListPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListPoliciesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServiceServer).ListPolicies(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/s3gw.control.ControlService/ListPolicies",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServiceServer).ListPolicies(ctx, req.(*ListPoliciesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ControlService_ServiceDesc is the grpc.ServiceDesc for ControlService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ControlService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "s3gw.control.ControlService",
|
|
HandlerType: (*ControlServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "HealthCheck",
|
|
Handler: _ControlService_HealthCheck_Handler,
|
|
},
|
|
{
|
|
MethodName: "PutPolicies",
|
|
Handler: _ControlService_PutPolicies_Handler,
|
|
},
|
|
{
|
|
MethodName: "RemovePolicies",
|
|
Handler: _ControlService_RemovePolicies_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetPolicy",
|
|
Handler: _ControlService_GetPolicy_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListPolicies",
|
|
Handler: _ControlService_ListPolicies_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "pkg/service/control/service.proto",
|
|
}
|