123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: system_service.proto
- // package声明符,用来防止不同的消息类型有命名冲突
- package pb
- import (
- context "context"
- v1 "cp-system-management/pb/v1"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- math "math"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
- func init() {
- proto.RegisterFile("system_service.proto", fileDescriptor_5d35c01297e407e4)
- }
- var fileDescriptor_5d35c01297e407e4 = []byte{
- // 403 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xdd, 0x4a, 0xfb, 0x40,
- 0x10, 0xc5, 0xff, 0x37, 0xff, 0x82, 0x83, 0x9f, 0xdb, 0x52, 0xdb, 0x5a, 0xb5, 0x16, 0x6f, 0x44,
- 0x9a, 0x52, 0x7d, 0x01, 0x6b, 0x45, 0x10, 0x03, 0x4a, 0xa5, 0x20, 0x0a, 0x96, 0xa4, 0x19, 0xd2,
- 0x40, 0x9b, 0xc4, 0xec, 0xb6, 0x12, 0x9f, 0xcf, 0x07, 0x13, 0x32, 0xdd, 0x98, 0x8f, 0x4d, 0xf5,
- 0x32, 0xe7, 0x9c, 0xfd, 0xcd, 0xcc, 0xee, 0x66, 0xa1, 0xc2, 0x43, 0x2e, 0x70, 0x3e, 0xe6, 0x18,
- 0x2c, 0x9d, 0x09, 0x6a, 0x7e, 0xe0, 0x09, 0x8f, 0x81, 0x6f, 0x6a, 0x2b, 0xa5, 0xb1, 0xb3, 0xec,
- 0x75, 0x29, 0x44, 0xe6, 0xc5, 0xd7, 0x06, 0x94, 0x9e, 0x22, 0x81, 0x5d, 0x01, 0x0c, 0x02, 0x34,
- 0x04, 0x8e, 0x38, 0x06, 0xac, 0xa6, 0xf9, 0xe6, 0x78, 0xd9, 0xd3, 0x7e, 0xa4, 0x21, 0xbe, 0x2f,
- 0x90, 0x8b, 0x46, 0x55, 0xe1, 0xf8, 0xb3, 0xb0, 0xfd, 0x8f, 0xf5, 0xe0, 0xbf, 0xee, 0xd9, 0x8e,
- 0xcb, 0xca, 0xab, 0x48, 0xf4, 0x25, 0xd7, 0xed, 0xa5, 0x45, 0x5a, 0xa2, 0xc3, 0xf6, 0x60, 0x6a,
- 0xb8, 0x36, 0x3e, 0x1a, 0x9c, 0x7f, 0x78, 0x81, 0xc5, 0x9a, 0x12, 0x9f, 0x92, 0x25, 0xa4, 0x51,
- 0xe0, 0x12, 0xed, 0x19, 0x18, 0x75, 0xf5, 0x10, 0xd8, 0x86, 0xeb, 0x7c, 0x1a, 0xc2, 0xf1, 0x5c,
- 0xd6, 0x4a, 0x35, 0x9c, 0xb4, 0x24, 0xf5, 0x68, 0x4d, 0x22, 0x26, 0xdf, 0xe0, 0x0c, 0x0b, 0xc8,
- 0x79, 0x2b, 0x4b, 0x56, 0x25, 0x62, 0xf2, 0xc8, 0xb7, 0x8a, 0x7a, 0xce, 0x5b, 0x59, 0xb2, 0x2a,
- 0x41, 0xe4, 0x21, 0xec, 0x26, 0x65, 0xdd, 0xe1, 0x82, 0xc9, 0x55, 0x59, 0x43, 0x52, 0x9b, 0x85,
- 0x3e, 0x31, 0x2d, 0xa8, 0xe6, 0x37, 0x29, 0xba, 0x30, 0xa7, 0x85, 0x7b, 0x98, 0xbc, 0x3c, 0xed,
- 0x5f, 0x52, 0x54, 0xe5, 0x0d, 0x2a, 0x59, 0x2b, 0xea, 0xbe, 0xad, 0xe8, 0x4e, 0x9a, 0xb2, 0x42,
- 0x6b, 0x6d, 0x26, 0x9e, 0x22, 0x6b, 0xd3, 0x36, 0xc6, 0x53, 0xa8, 0xed, 0xec, 0x14, 0x45, 0x29,
- 0xaa, 0x12, 0xc2, 0x61, 0x7e, 0x40, 0x8e, 0x22, 0xbe, 0xea, 0xe7, 0x05, 0x98, 0x54, 0x4a, 0xd6,
- 0x3c, 0xfb, 0x5b, 0x98, 0x4a, 0xbf, 0x42, 0x39, 0x99, 0xbb, 0xc7, 0xb0, 0xbf, 0x10, 0x53, 0x76,
- 0xa2, 0x60, 0xac, 0x3c, 0x59, 0xe6, 0x78, 0x5d, 0x84, 0xe0, 0xb7, 0xb0, 0x49, 0x4f, 0x86, 0xee,
- 0xd9, 0x7d, 0xcb, 0x62, 0xf2, 0x9f, 0x4c, 0x8a, 0x12, 0x57, 0x53, 0x7a, 0xc4, 0xb9, 0x83, 0xad,
- 0x58, 0x8e, 0x8e, 0xf7, 0x20, 0x1b, 0x4e, 0x9e, 0x6b, 0x5d, 0x6d, 0x46, 0xa8, 0xeb, 0xfa, 0xcb,
- 0xfe, 0xc4, 0xef, 0xd0, 0xcb, 0xd6, 0x99, 0x1b, 0xae, 0x61, 0xe3, 0x1c, 0x5d, 0xd1, 0xf5, 0x4d,
- 0xb3, 0x14, 0x3d, 0x74, 0x97, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x38, 0x07, 0x41, 0x1d,
- 0x05, 0x00, 0x00,
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConnInterface
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion6
- // SystemClient is the client API for System service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type SystemClient interface {
- // 创建系统用户
- CreateUser(ctx context.Context, in *v1.CreateUserRequest, opts ...grpc.CallOption) (*v1.CreateUserReply, error)
- // 系统用户登录
- Login(ctx context.Context, in *v1.LoginRequest, opts ...grpc.CallOption) (*v1.LoginReply, error)
- // 修改密码
- ChangePassword(ctx context.Context, in *v1.ChangePasswordRequest, opts ...grpc.CallOption) (*v1.ChangePasswordReply, error)
- // 创建机构
- CreateOrganization(ctx context.Context, in *v1.CreateOrganizationRequest, opts ...grpc.CallOption) (*v1.CreateOrganizationReply, error)
- // 删除机构
- DeleteOrganization(ctx context.Context, in *v1.DeleteOrganizationRequest, opts ...grpc.CallOption) (*v1.DeleteOrganizationReply, error)
- // 修改机构
- UpdateOrganization(ctx context.Context, in *v1.UpdateOrganizationRequest, opts ...grpc.CallOption) (*v1.UpdateOrganizationReply, error)
- // 机构列表
- OrganizationList(ctx context.Context, in *v1.OrganizationListRequest, opts ...grpc.CallOption) (*v1.OrganizationListReply, error)
- // 创建机构超级管理员账号
- CreateOrganizationUser(ctx context.Context, in *v1.CreateOrganizationUserRequest, opts ...grpc.CallOption) (*v1.CreateOrganizationUserReply, error)
- // 获取机构超级管理员账号
- OrganizationUserList(ctx context.Context, in *v1.OrganizationUserListRequest, opts ...grpc.CallOption) (*v1.OrganizationUserListReply, error)
- // 修改机构超级管理员账号
- OrganizationUserUpdate(ctx context.Context, in *v1.OrganizationUserUpdateRequest, opts ...grpc.CallOption) (*v1.OrganizationUserUpdateReply, error)
- // 重置机构超级管理员账号密码
- OrganizationUserResetPassword(ctx context.Context, in *v1.OrganizationUserResetPasswordRequest, opts ...grpc.CallOption) (*v1.OrganizationUserResetPasswordReply, error)
- // 机构key认证,机构端调用
- OrganizationKeyAuth(ctx context.Context, in *v1.OrganizationKeyAuthRequest, opts ...grpc.CallOption) (*v1.OrganizationKeyAuthReply, error)
- // 添加系统操作日志
- SystemLogAdd(ctx context.Context, in *v1.SystemLogAddRequest, opts ...grpc.CallOption) (*v1.SystemLogAddReply, error)
- // 系统操作日志列表
- SystemLogList(ctx context.Context, in *v1.SystemLogListRequest, opts ...grpc.CallOption) (*v1.SystemLogListReply, error)
- }
- type systemClient struct {
- cc grpc.ClientConnInterface
- }
- func NewSystemClient(cc grpc.ClientConnInterface) SystemClient {
- return &systemClient{cc}
- }
- func (c *systemClient) CreateUser(ctx context.Context, in *v1.CreateUserRequest, opts ...grpc.CallOption) (*v1.CreateUserReply, error) {
- out := new(v1.CreateUserReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/CreateUser", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) Login(ctx context.Context, in *v1.LoginRequest, opts ...grpc.CallOption) (*v1.LoginReply, error) {
- out := new(v1.LoginReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/Login", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) ChangePassword(ctx context.Context, in *v1.ChangePasswordRequest, opts ...grpc.CallOption) (*v1.ChangePasswordReply, error) {
- out := new(v1.ChangePasswordReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/ChangePassword", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) CreateOrganization(ctx context.Context, in *v1.CreateOrganizationRequest, opts ...grpc.CallOption) (*v1.CreateOrganizationReply, error) {
- out := new(v1.CreateOrganizationReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/CreateOrganization", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) DeleteOrganization(ctx context.Context, in *v1.DeleteOrganizationRequest, opts ...grpc.CallOption) (*v1.DeleteOrganizationReply, error) {
- out := new(v1.DeleteOrganizationReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/DeleteOrganization", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) UpdateOrganization(ctx context.Context, in *v1.UpdateOrganizationRequest, opts ...grpc.CallOption) (*v1.UpdateOrganizationReply, error) {
- out := new(v1.UpdateOrganizationReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/UpdateOrganization", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) OrganizationList(ctx context.Context, in *v1.OrganizationListRequest, opts ...grpc.CallOption) (*v1.OrganizationListReply, error) {
- out := new(v1.OrganizationListReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/OrganizationList", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) CreateOrganizationUser(ctx context.Context, in *v1.CreateOrganizationUserRequest, opts ...grpc.CallOption) (*v1.CreateOrganizationUserReply, error) {
- out := new(v1.CreateOrganizationUserReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/CreateOrganizationUser", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) OrganizationUserList(ctx context.Context, in *v1.OrganizationUserListRequest, opts ...grpc.CallOption) (*v1.OrganizationUserListReply, error) {
- out := new(v1.OrganizationUserListReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/OrganizationUserList", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) OrganizationUserUpdate(ctx context.Context, in *v1.OrganizationUserUpdateRequest, opts ...grpc.CallOption) (*v1.OrganizationUserUpdateReply, error) {
- out := new(v1.OrganizationUserUpdateReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/OrganizationUserUpdate", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) OrganizationUserResetPassword(ctx context.Context, in *v1.OrganizationUserResetPasswordRequest, opts ...grpc.CallOption) (*v1.OrganizationUserResetPasswordReply, error) {
- out := new(v1.OrganizationUserResetPasswordReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/OrganizationUserResetPassword", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) OrganizationKeyAuth(ctx context.Context, in *v1.OrganizationKeyAuthRequest, opts ...grpc.CallOption) (*v1.OrganizationKeyAuthReply, error) {
- out := new(v1.OrganizationKeyAuthReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/OrganizationKeyAuth", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) SystemLogAdd(ctx context.Context, in *v1.SystemLogAddRequest, opts ...grpc.CallOption) (*v1.SystemLogAddReply, error) {
- out := new(v1.SystemLogAddReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/SystemLogAdd", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *systemClient) SystemLogList(ctx context.Context, in *v1.SystemLogListRequest, opts ...grpc.CallOption) (*v1.SystemLogListReply, error) {
- out := new(v1.SystemLogListReply)
- err := c.cc.Invoke(ctx, "/pb.service.System/SystemLogList", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // SystemServer is the server API for System service.
- type SystemServer interface {
- // 创建系统用户
- CreateUser(context.Context, *v1.CreateUserRequest) (*v1.CreateUserReply, error)
- // 系统用户登录
- Login(context.Context, *v1.LoginRequest) (*v1.LoginReply, error)
- // 修改密码
- ChangePassword(context.Context, *v1.ChangePasswordRequest) (*v1.ChangePasswordReply, error)
- // 创建机构
- CreateOrganization(context.Context, *v1.CreateOrganizationRequest) (*v1.CreateOrganizationReply, error)
- // 删除机构
- DeleteOrganization(context.Context, *v1.DeleteOrganizationRequest) (*v1.DeleteOrganizationReply, error)
- // 修改机构
- UpdateOrganization(context.Context, *v1.UpdateOrganizationRequest) (*v1.UpdateOrganizationReply, error)
- // 机构列表
- OrganizationList(context.Context, *v1.OrganizationListRequest) (*v1.OrganizationListReply, error)
- // 创建机构超级管理员账号
- CreateOrganizationUser(context.Context, *v1.CreateOrganizationUserRequest) (*v1.CreateOrganizationUserReply, error)
- // 获取机构超级管理员账号
- OrganizationUserList(context.Context, *v1.OrganizationUserListRequest) (*v1.OrganizationUserListReply, error)
- // 修改机构超级管理员账号
- OrganizationUserUpdate(context.Context, *v1.OrganizationUserUpdateRequest) (*v1.OrganizationUserUpdateReply, error)
- // 重置机构超级管理员账号密码
- OrganizationUserResetPassword(context.Context, *v1.OrganizationUserResetPasswordRequest) (*v1.OrganizationUserResetPasswordReply, error)
- // 机构key认证,机构端调用
- OrganizationKeyAuth(context.Context, *v1.OrganizationKeyAuthRequest) (*v1.OrganizationKeyAuthReply, error)
- // 添加系统操作日志
- SystemLogAdd(context.Context, *v1.SystemLogAddRequest) (*v1.SystemLogAddReply, error)
- // 系统操作日志列表
- SystemLogList(context.Context, *v1.SystemLogListRequest) (*v1.SystemLogListReply, error)
- }
- // UnimplementedSystemServer can be embedded to have forward compatible implementations.
- type UnimplementedSystemServer struct {
- }
- func (*UnimplementedSystemServer) CreateUser(ctx context.Context, req *v1.CreateUserRequest) (*v1.CreateUserReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
- }
- func (*UnimplementedSystemServer) Login(ctx context.Context, req *v1.LoginRequest) (*v1.LoginReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
- }
- func (*UnimplementedSystemServer) ChangePassword(ctx context.Context, req *v1.ChangePasswordRequest) (*v1.ChangePasswordReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
- }
- func (*UnimplementedSystemServer) CreateOrganization(ctx context.Context, req *v1.CreateOrganizationRequest) (*v1.CreateOrganizationReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateOrganization not implemented")
- }
- func (*UnimplementedSystemServer) DeleteOrganization(ctx context.Context, req *v1.DeleteOrganizationRequest) (*v1.DeleteOrganizationReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteOrganization not implemented")
- }
- func (*UnimplementedSystemServer) UpdateOrganization(ctx context.Context, req *v1.UpdateOrganizationRequest) (*v1.UpdateOrganizationReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateOrganization not implemented")
- }
- func (*UnimplementedSystemServer) OrganizationList(ctx context.Context, req *v1.OrganizationListRequest) (*v1.OrganizationListReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OrganizationList not implemented")
- }
- func (*UnimplementedSystemServer) CreateOrganizationUser(ctx context.Context, req *v1.CreateOrganizationUserRequest) (*v1.CreateOrganizationUserReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateOrganizationUser not implemented")
- }
- func (*UnimplementedSystemServer) OrganizationUserList(ctx context.Context, req *v1.OrganizationUserListRequest) (*v1.OrganizationUserListReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OrganizationUserList not implemented")
- }
- func (*UnimplementedSystemServer) OrganizationUserUpdate(ctx context.Context, req *v1.OrganizationUserUpdateRequest) (*v1.OrganizationUserUpdateReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OrganizationUserUpdate not implemented")
- }
- func (*UnimplementedSystemServer) OrganizationUserResetPassword(ctx context.Context, req *v1.OrganizationUserResetPasswordRequest) (*v1.OrganizationUserResetPasswordReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OrganizationUserResetPassword not implemented")
- }
- func (*UnimplementedSystemServer) OrganizationKeyAuth(ctx context.Context, req *v1.OrganizationKeyAuthRequest) (*v1.OrganizationKeyAuthReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OrganizationKeyAuth not implemented")
- }
- func (*UnimplementedSystemServer) SystemLogAdd(ctx context.Context, req *v1.SystemLogAddRequest) (*v1.SystemLogAddReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SystemLogAdd not implemented")
- }
- func (*UnimplementedSystemServer) SystemLogList(ctx context.Context, req *v1.SystemLogListRequest) (*v1.SystemLogListReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SystemLogList not implemented")
- }
- func RegisterSystemServer(s *grpc.Server, srv SystemServer) {
- s.RegisterService(&_System_serviceDesc, srv)
- }
- func _System_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.CreateUserRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).CreateUser(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/CreateUser",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).CreateUser(ctx, req.(*v1.CreateUserRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.LoginRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).Login(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/Login",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).Login(ctx, req.(*v1.LoginRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.ChangePasswordRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).ChangePassword(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/ChangePassword",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).ChangePassword(ctx, req.(*v1.ChangePasswordRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_CreateOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.CreateOrganizationRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).CreateOrganization(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/CreateOrganization",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).CreateOrganization(ctx, req.(*v1.CreateOrganizationRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_DeleteOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.DeleteOrganizationRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).DeleteOrganization(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/DeleteOrganization",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).DeleteOrganization(ctx, req.(*v1.DeleteOrganizationRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_UpdateOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.UpdateOrganizationRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).UpdateOrganization(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/UpdateOrganization",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).UpdateOrganization(ctx, req.(*v1.UpdateOrganizationRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_OrganizationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.OrganizationListRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).OrganizationList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/OrganizationList",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).OrganizationList(ctx, req.(*v1.OrganizationListRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_CreateOrganizationUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.CreateOrganizationUserRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).CreateOrganizationUser(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/CreateOrganizationUser",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).CreateOrganizationUser(ctx, req.(*v1.CreateOrganizationUserRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_OrganizationUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.OrganizationUserListRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).OrganizationUserList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/OrganizationUserList",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).OrganizationUserList(ctx, req.(*v1.OrganizationUserListRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_OrganizationUserUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.OrganizationUserUpdateRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).OrganizationUserUpdate(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/OrganizationUserUpdate",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).OrganizationUserUpdate(ctx, req.(*v1.OrganizationUserUpdateRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_OrganizationUserResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.OrganizationUserResetPasswordRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).OrganizationUserResetPassword(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/OrganizationUserResetPassword",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).OrganizationUserResetPassword(ctx, req.(*v1.OrganizationUserResetPasswordRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_OrganizationKeyAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.OrganizationKeyAuthRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).OrganizationKeyAuth(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/OrganizationKeyAuth",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).OrganizationKeyAuth(ctx, req.(*v1.OrganizationKeyAuthRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_SystemLogAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.SystemLogAddRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).SystemLogAdd(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/SystemLogAdd",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).SystemLogAdd(ctx, req.(*v1.SystemLogAddRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _System_SystemLogList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.SystemLogListRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SystemServer).SystemLogList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.System/SystemLogList",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SystemServer).SystemLogList(ctx, req.(*v1.SystemLogListRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _System_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.service.System",
- HandlerType: (*SystemServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "CreateUser",
- Handler: _System_CreateUser_Handler,
- },
- {
- MethodName: "Login",
- Handler: _System_Login_Handler,
- },
- {
- MethodName: "ChangePassword",
- Handler: _System_ChangePassword_Handler,
- },
- {
- MethodName: "CreateOrganization",
- Handler: _System_CreateOrganization_Handler,
- },
- {
- MethodName: "DeleteOrganization",
- Handler: _System_DeleteOrganization_Handler,
- },
- {
- MethodName: "UpdateOrganization",
- Handler: _System_UpdateOrganization_Handler,
- },
- {
- MethodName: "OrganizationList",
- Handler: _System_OrganizationList_Handler,
- },
- {
- MethodName: "CreateOrganizationUser",
- Handler: _System_CreateOrganizationUser_Handler,
- },
- {
- MethodName: "OrganizationUserList",
- Handler: _System_OrganizationUserList_Handler,
- },
- {
- MethodName: "OrganizationUserUpdate",
- Handler: _System_OrganizationUserUpdate_Handler,
- },
- {
- MethodName: "OrganizationUserResetPassword",
- Handler: _System_OrganizationUserResetPassword_Handler,
- },
- {
- MethodName: "OrganizationKeyAuth",
- Handler: _System_OrganizationKeyAuth_Handler,
- },
- {
- MethodName: "SystemLogAdd",
- Handler: _System_SystemLogAdd_Handler,
- },
- {
- MethodName: "SystemLogList",
- Handler: _System_SystemLogList_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "system_service.proto",
- }
|