286 lines
11 KiB
Go
286 lines
11 KiB
Go
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// - protoc-gen-go-grpc v1.2.0
|
||
|
// - protoc v3.19.4
|
||
|
// source: groupsmanagement.proto
|
||
|
|
||
|
package grpcapi
|
||
|
|
||
|
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
|
||
|
|
||
|
// GroupsManagementClient is the client API for GroupsManagement 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 GroupsManagementClient interface {
|
||
|
AddGroup(ctx context.Context, in *AddGroupRequest, opts ...grpc.CallOption) (*AddGroupResponse, error)
|
||
|
GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*GetGroupResponse, error)
|
||
|
GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*GetGroupsResponse, error)
|
||
|
GetGroupsBatch(ctx context.Context, in *GetGroupsBatchRequest, opts ...grpc.CallOption) (*GetGroupsBatchResponse, error)
|
||
|
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error)
|
||
|
Unsubscribe(ctx context.Context, in *UnsubscribeRequest, opts ...grpc.CallOption) (*UnsubscribeResponse, error)
|
||
|
}
|
||
|
|
||
|
type groupsManagementClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewGroupsManagementClient(cc grpc.ClientConnInterface) GroupsManagementClient {
|
||
|
return &groupsManagementClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *groupsManagementClient) AddGroup(ctx context.Context, in *AddGroupRequest, opts ...grpc.CallOption) (*AddGroupResponse, error) {
|
||
|
out := new(AddGroupResponse)
|
||
|
err := c.cc.Invoke(ctx, "/GroupsManagement/AddGroup", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *groupsManagementClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*GetGroupResponse, error) {
|
||
|
out := new(GetGroupResponse)
|
||
|
err := c.cc.Invoke(ctx, "/GroupsManagement/GetGroup", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *groupsManagementClient) GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*GetGroupsResponse, error) {
|
||
|
out := new(GetGroupsResponse)
|
||
|
err := c.cc.Invoke(ctx, "/GroupsManagement/GetGroups", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *groupsManagementClient) GetGroupsBatch(ctx context.Context, in *GetGroupsBatchRequest, opts ...grpc.CallOption) (*GetGroupsBatchResponse, error) {
|
||
|
out := new(GetGroupsBatchResponse)
|
||
|
err := c.cc.Invoke(ctx, "/GroupsManagement/GetGroupsBatch", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *groupsManagementClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) {
|
||
|
out := new(SubscribeResponse)
|
||
|
err := c.cc.Invoke(ctx, "/GroupsManagement/Subscribe", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *groupsManagementClient) Unsubscribe(ctx context.Context, in *UnsubscribeRequest, opts ...grpc.CallOption) (*UnsubscribeResponse, error) {
|
||
|
out := new(UnsubscribeResponse)
|
||
|
err := c.cc.Invoke(ctx, "/GroupsManagement/Unsubscribe", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// GroupsManagementServer is the server API for GroupsManagement service.
|
||
|
// All implementations must embed UnimplementedGroupsManagementServer
|
||
|
// for forward compatibility
|
||
|
type GroupsManagementServer interface {
|
||
|
AddGroup(context.Context, *AddGroupRequest) (*AddGroupResponse, error)
|
||
|
GetGroup(context.Context, *GetGroupRequest) (*GetGroupResponse, error)
|
||
|
GetGroups(context.Context, *GetGroupsRequest) (*GetGroupsResponse, error)
|
||
|
GetGroupsBatch(context.Context, *GetGroupsBatchRequest) (*GetGroupsBatchResponse, error)
|
||
|
Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
|
||
|
Unsubscribe(context.Context, *UnsubscribeRequest) (*UnsubscribeResponse, error)
|
||
|
mustEmbedUnimplementedGroupsManagementServer()
|
||
|
}
|
||
|
|
||
|
// UnimplementedGroupsManagementServer must be embedded to have forward compatible implementations.
|
||
|
type UnimplementedGroupsManagementServer struct {
|
||
|
}
|
||
|
|
||
|
func (UnimplementedGroupsManagementServer) AddGroup(context.Context, *AddGroupRequest) (*AddGroupResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method AddGroup not implemented")
|
||
|
}
|
||
|
func (UnimplementedGroupsManagementServer) GetGroup(context.Context, *GetGroupRequest) (*GetGroupResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented")
|
||
|
}
|
||
|
func (UnimplementedGroupsManagementServer) GetGroups(context.Context, *GetGroupsRequest) (*GetGroupsResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetGroups not implemented")
|
||
|
}
|
||
|
func (UnimplementedGroupsManagementServer) GetGroupsBatch(context.Context, *GetGroupsBatchRequest) (*GetGroupsBatchResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetGroupsBatch not implemented")
|
||
|
}
|
||
|
func (UnimplementedGroupsManagementServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
|
||
|
}
|
||
|
func (UnimplementedGroupsManagementServer) Unsubscribe(context.Context, *UnsubscribeRequest) (*UnsubscribeResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Unsubscribe not implemented")
|
||
|
}
|
||
|
func (UnimplementedGroupsManagementServer) mustEmbedUnimplementedGroupsManagementServer() {}
|
||
|
|
||
|
// UnsafeGroupsManagementServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to GroupsManagementServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeGroupsManagementServer interface {
|
||
|
mustEmbedUnimplementedGroupsManagementServer()
|
||
|
}
|
||
|
|
||
|
func RegisterGroupsManagementServer(s grpc.ServiceRegistrar, srv GroupsManagementServer) {
|
||
|
s.RegisterService(&GroupsManagement_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _GroupsManagement_AddGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(AddGroupRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(GroupsManagementServer).AddGroup(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/GroupsManagement/AddGroup",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(GroupsManagementServer).AddGroup(ctx, req.(*AddGroupRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _GroupsManagement_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetGroupRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(GroupsManagementServer).GetGroup(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/GroupsManagement/GetGroup",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(GroupsManagementServer).GetGroup(ctx, req.(*GetGroupRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _GroupsManagement_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetGroupsRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(GroupsManagementServer).GetGroups(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/GroupsManagement/GetGroups",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(GroupsManagementServer).GetGroups(ctx, req.(*GetGroupsRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _GroupsManagement_GetGroupsBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetGroupsBatchRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(GroupsManagementServer).GetGroupsBatch(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/GroupsManagement/GetGroupsBatch",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(GroupsManagementServer).GetGroupsBatch(ctx, req.(*GetGroupsBatchRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _GroupsManagement_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(SubscribeRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(GroupsManagementServer).Subscribe(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/GroupsManagement/Subscribe",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(GroupsManagementServer).Subscribe(ctx, req.(*SubscribeRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _GroupsManagement_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(UnsubscribeRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(GroupsManagementServer).Unsubscribe(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/GroupsManagement/Unsubscribe",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(GroupsManagementServer).Unsubscribe(ctx, req.(*UnsubscribeRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// GroupsManagement_ServiceDesc is the grpc.ServiceDesc for GroupsManagement service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var GroupsManagement_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "GroupsManagement",
|
||
|
HandlerType: (*GroupsManagementServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "AddGroup",
|
||
|
Handler: _GroupsManagement_AddGroup_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetGroup",
|
||
|
Handler: _GroupsManagement_GetGroup_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetGroups",
|
||
|
Handler: _GroupsManagement_GetGroups_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetGroupsBatch",
|
||
|
Handler: _GroupsManagement_GetGroupsBatch_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Subscribe",
|
||
|
Handler: _GroupsManagement_Subscribe_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Unsubscribe",
|
||
|
Handler: _GroupsManagement_Unsubscribe_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "groupsmanagement.proto",
|
||
|
}
|