910 lines
33 KiB
Go
910 lines
33 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.20.3
|
|
// source: rpc/system/system.proto
|
|
|
|
package pb
|
|
|
|
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
|
|
|
|
// SystemServiceClient is the client API for SystemService 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 SystemServiceClient interface {
|
|
// Auth
|
|
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
|
|
ChangePassword(ctx context.Context, in *ChangePasswordReq, opts ...grpc.CallOption) (*Empty, error)
|
|
// User
|
|
CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*IdResp, error)
|
|
UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*Empty, error)
|
|
DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*Empty, error)
|
|
GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*UserInfo, error)
|
|
ListUser(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserResp, error)
|
|
UpdateUserStatus(ctx context.Context, in *UpdateUserStatusReq, opts ...grpc.CallOption) (*Empty, error)
|
|
// Role
|
|
CreateRole(ctx context.Context, in *CreateRoleReq, opts ...grpc.CallOption) (*IdResp, error)
|
|
UpdateRole(ctx context.Context, in *UpdateRoleReq, opts ...grpc.CallOption) (*Empty, error)
|
|
DeleteRole(ctx context.Context, in *DeleteRoleReq, opts ...grpc.CallOption) (*Empty, error)
|
|
GetRole(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*RoleInfo, error)
|
|
ListRole(ctx context.Context, in *ListRoleReq, opts ...grpc.CallOption) (*ListRoleResp, error)
|
|
SetRolePermissions(ctx context.Context, in *SetRolePermissionsReq, opts ...grpc.CallOption) (*Empty, error)
|
|
// Menu
|
|
CreateMenu(ctx context.Context, in *CreateMenuReq, opts ...grpc.CallOption) (*IdResp, error)
|
|
UpdateMenu(ctx context.Context, in *UpdateMenuReq, opts ...grpc.CallOption) (*Empty, error)
|
|
DeleteMenu(ctx context.Context, in *DeleteMenuReq, opts ...grpc.CallOption) (*Empty, error)
|
|
GetMenu(ctx context.Context, in *GetMenuReq, opts ...grpc.CallOption) (*MenuInfo, error)
|
|
ListMenu(ctx context.Context, in *ListMenuReq, opts ...grpc.CallOption) (*ListMenuResp, error)
|
|
// Operation Log
|
|
CreateOperationLog(ctx context.Context, in *CreateLogReq, opts ...grpc.CallOption) (*Empty, error)
|
|
ListOperationLog(ctx context.Context, in *ListLogReq, opts ...grpc.CallOption) (*ListLogResp, error)
|
|
// Config
|
|
ListConfig(ctx context.Context, in *ListConfigReq, opts ...grpc.CallOption) (*ListConfigResp, error)
|
|
UpdateConfig(ctx context.Context, in *UpdateConfigReq, opts ...grpc.CallOption) (*Empty, error)
|
|
}
|
|
|
|
type systemServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewSystemServiceClient(cc grpc.ClientConnInterface) SystemServiceClient {
|
|
return &systemServiceClient{cc}
|
|
}
|
|
|
|
func (c *systemServiceClient) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) {
|
|
out := new(LoginResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/Login", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) ChangePassword(ctx context.Context, in *ChangePasswordReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/ChangePassword", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
out := new(IdResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/CreateUser", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/UpdateUser", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/DeleteUser", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*UserInfo, error) {
|
|
out := new(UserInfo)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/GetUser", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) ListUser(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserResp, error) {
|
|
out := new(ListUserResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/ListUser", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) UpdateUserStatus(ctx context.Context, in *UpdateUserStatusReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/UpdateUserStatus", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) CreateRole(ctx context.Context, in *CreateRoleReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
out := new(IdResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/CreateRole", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) UpdateRole(ctx context.Context, in *UpdateRoleReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/UpdateRole", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) DeleteRole(ctx context.Context, in *DeleteRoleReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/DeleteRole", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) GetRole(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*RoleInfo, error) {
|
|
out := new(RoleInfo)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/GetRole", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) ListRole(ctx context.Context, in *ListRoleReq, opts ...grpc.CallOption) (*ListRoleResp, error) {
|
|
out := new(ListRoleResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/ListRole", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) SetRolePermissions(ctx context.Context, in *SetRolePermissionsReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/SetRolePermissions", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) CreateMenu(ctx context.Context, in *CreateMenuReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
out := new(IdResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/CreateMenu", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) UpdateMenu(ctx context.Context, in *UpdateMenuReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/UpdateMenu", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) DeleteMenu(ctx context.Context, in *DeleteMenuReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/DeleteMenu", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) GetMenu(ctx context.Context, in *GetMenuReq, opts ...grpc.CallOption) (*MenuInfo, error) {
|
|
out := new(MenuInfo)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/GetMenu", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) ListMenu(ctx context.Context, in *ListMenuReq, opts ...grpc.CallOption) (*ListMenuResp, error) {
|
|
out := new(ListMenuResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/ListMenu", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) CreateOperationLog(ctx context.Context, in *CreateLogReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/CreateOperationLog", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) ListOperationLog(ctx context.Context, in *ListLogReq, opts ...grpc.CallOption) (*ListLogResp, error) {
|
|
out := new(ListLogResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/ListOperationLog", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) ListConfig(ctx context.Context, in *ListConfigReq, opts ...grpc.CallOption) (*ListConfigResp, error) {
|
|
out := new(ListConfigResp)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/ListConfig", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *systemServiceClient) UpdateConfig(ctx context.Context, in *UpdateConfigReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, "/system.SystemService/UpdateConfig", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// SystemServiceServer is the server API for SystemService service.
|
|
// All implementations must embed UnimplementedSystemServiceServer
|
|
// for forward compatibility
|
|
type SystemServiceServer interface {
|
|
// Auth
|
|
Login(context.Context, *LoginReq) (*LoginResp, error)
|
|
ChangePassword(context.Context, *ChangePasswordReq) (*Empty, error)
|
|
// User
|
|
CreateUser(context.Context, *CreateUserReq) (*IdResp, error)
|
|
UpdateUser(context.Context, *UpdateUserReq) (*Empty, error)
|
|
DeleteUser(context.Context, *DeleteUserReq) (*Empty, error)
|
|
GetUser(context.Context, *GetUserReq) (*UserInfo, error)
|
|
ListUser(context.Context, *ListUserReq) (*ListUserResp, error)
|
|
UpdateUserStatus(context.Context, *UpdateUserStatusReq) (*Empty, error)
|
|
// Role
|
|
CreateRole(context.Context, *CreateRoleReq) (*IdResp, error)
|
|
UpdateRole(context.Context, *UpdateRoleReq) (*Empty, error)
|
|
DeleteRole(context.Context, *DeleteRoleReq) (*Empty, error)
|
|
GetRole(context.Context, *GetRoleReq) (*RoleInfo, error)
|
|
ListRole(context.Context, *ListRoleReq) (*ListRoleResp, error)
|
|
SetRolePermissions(context.Context, *SetRolePermissionsReq) (*Empty, error)
|
|
// Menu
|
|
CreateMenu(context.Context, *CreateMenuReq) (*IdResp, error)
|
|
UpdateMenu(context.Context, *UpdateMenuReq) (*Empty, error)
|
|
DeleteMenu(context.Context, *DeleteMenuReq) (*Empty, error)
|
|
GetMenu(context.Context, *GetMenuReq) (*MenuInfo, error)
|
|
ListMenu(context.Context, *ListMenuReq) (*ListMenuResp, error)
|
|
// Operation Log
|
|
CreateOperationLog(context.Context, *CreateLogReq) (*Empty, error)
|
|
ListOperationLog(context.Context, *ListLogReq) (*ListLogResp, error)
|
|
// Config
|
|
ListConfig(context.Context, *ListConfigReq) (*ListConfigResp, error)
|
|
UpdateConfig(context.Context, *UpdateConfigReq) (*Empty, error)
|
|
mustEmbedUnimplementedSystemServiceServer()
|
|
}
|
|
|
|
// UnimplementedSystemServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedSystemServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedSystemServiceServer) Login(context.Context, *LoginReq) (*LoginResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) ChangePassword(context.Context, *ChangePasswordReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) CreateUser(context.Context, *CreateUserReq) (*IdResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) UpdateUser(context.Context, *UpdateUserReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) DeleteUser(context.Context, *DeleteUserReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) GetUser(context.Context, *GetUserReq) (*UserInfo, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) ListUser(context.Context, *ListUserReq) (*ListUserResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListUser not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) UpdateUserStatus(context.Context, *UpdateUserStatusReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserStatus not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) CreateRole(context.Context, *CreateRoleReq) (*IdResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) UpdateRole(context.Context, *UpdateRoleReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) DeleteRole(context.Context, *DeleteRoleReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) GetRole(context.Context, *GetRoleReq) (*RoleInfo, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) ListRole(context.Context, *ListRoleReq) (*ListRoleResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListRole not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) SetRolePermissions(context.Context, *SetRolePermissionsReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetRolePermissions not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) CreateMenu(context.Context, *CreateMenuReq) (*IdResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateMenu not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) UpdateMenu(context.Context, *UpdateMenuReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateMenu not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) DeleteMenu(context.Context, *DeleteMenuReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteMenu not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) GetMenu(context.Context, *GetMenuReq) (*MenuInfo, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetMenu not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) ListMenu(context.Context, *ListMenuReq) (*ListMenuResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListMenu not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) CreateOperationLog(context.Context, *CreateLogReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateOperationLog not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) ListOperationLog(context.Context, *ListLogReq) (*ListLogResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListOperationLog not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) ListConfig(context.Context, *ListConfigReq) (*ListConfigResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListConfig not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) UpdateConfig(context.Context, *UpdateConfigReq) (*Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateConfig not implemented")
|
|
}
|
|
func (UnimplementedSystemServiceServer) mustEmbedUnimplementedSystemServiceServer() {}
|
|
|
|
// UnsafeSystemServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to SystemServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeSystemServiceServer interface {
|
|
mustEmbedUnimplementedSystemServiceServer()
|
|
}
|
|
|
|
func RegisterSystemServiceServer(s grpc.ServiceRegistrar, srv SystemServiceServer) {
|
|
s.RegisterService(&SystemService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _SystemService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LoginReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).Login(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/Login",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).Login(ctx, req.(*LoginReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ChangePasswordReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).ChangePassword(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/ChangePassword",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).ChangePassword(ctx, req.(*ChangePasswordReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).CreateUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/CreateUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).CreateUser(ctx, req.(*CreateUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).UpdateUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/UpdateUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).UpdateUser(ctx, req.(*UpdateUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).DeleteUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/DeleteUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).DeleteUser(ctx, req.(*DeleteUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).GetUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/GetUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).GetUser(ctx, req.(*GetUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_ListUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).ListUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/ListUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).ListUser(ctx, req.(*ListUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_UpdateUserStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUserStatusReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).UpdateUserStatus(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/UpdateUserStatus",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).UpdateUserStatus(ctx, req.(*UpdateUserStatusReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_CreateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateRoleReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).CreateRole(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/CreateRole",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).CreateRole(ctx, req.(*CreateRoleReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateRoleReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).UpdateRole(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/UpdateRole",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).UpdateRole(ctx, req.(*UpdateRoleReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_DeleteRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteRoleReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).DeleteRole(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/DeleteRole",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).DeleteRole(ctx, req.(*DeleteRoleReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRoleReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).GetRole(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/GetRole",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).GetRole(ctx, req.(*GetRoleReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_ListRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListRoleReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).ListRole(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/ListRole",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).ListRole(ctx, req.(*ListRoleReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_SetRolePermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetRolePermissionsReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).SetRolePermissions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/SetRolePermissions",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).SetRolePermissions(ctx, req.(*SetRolePermissionsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_CreateMenu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateMenuReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).CreateMenu(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/CreateMenu",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).CreateMenu(ctx, req.(*CreateMenuReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_UpdateMenu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateMenuReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).UpdateMenu(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/UpdateMenu",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).UpdateMenu(ctx, req.(*UpdateMenuReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_DeleteMenu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteMenuReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).DeleteMenu(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/DeleteMenu",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).DeleteMenu(ctx, req.(*DeleteMenuReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_GetMenu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetMenuReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).GetMenu(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/GetMenu",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).GetMenu(ctx, req.(*GetMenuReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_ListMenu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListMenuReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).ListMenu(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/ListMenu",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).ListMenu(ctx, req.(*ListMenuReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_CreateOperationLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateLogReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).CreateOperationLog(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/CreateOperationLog",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).CreateOperationLog(ctx, req.(*CreateLogReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_ListOperationLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListLogReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).ListOperationLog(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/ListOperationLog",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).ListOperationLog(ctx, req.(*ListLogReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_ListConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListConfigReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).ListConfig(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/ListConfig",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).ListConfig(ctx, req.(*ListConfigReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SystemService_UpdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateConfigReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SystemServiceServer).UpdateConfig(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/system.SystemService/UpdateConfig",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SystemServiceServer).UpdateConfig(ctx, req.(*UpdateConfigReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// SystemService_ServiceDesc is the grpc.ServiceDesc for SystemService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var SystemService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "system.SystemService",
|
|
HandlerType: (*SystemServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Login",
|
|
Handler: _SystemService_Login_Handler,
|
|
},
|
|
{
|
|
MethodName: "ChangePassword",
|
|
Handler: _SystemService_ChangePassword_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateUser",
|
|
Handler: _SystemService_CreateUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateUser",
|
|
Handler: _SystemService_UpdateUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteUser",
|
|
Handler: _SystemService_DeleteUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUser",
|
|
Handler: _SystemService_GetUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListUser",
|
|
Handler: _SystemService_ListUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateUserStatus",
|
|
Handler: _SystemService_UpdateUserStatus_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateRole",
|
|
Handler: _SystemService_CreateRole_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateRole",
|
|
Handler: _SystemService_UpdateRole_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteRole",
|
|
Handler: _SystemService_DeleteRole_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetRole",
|
|
Handler: _SystemService_GetRole_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListRole",
|
|
Handler: _SystemService_ListRole_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetRolePermissions",
|
|
Handler: _SystemService_SetRolePermissions_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateMenu",
|
|
Handler: _SystemService_CreateMenu_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateMenu",
|
|
Handler: _SystemService_UpdateMenu_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteMenu",
|
|
Handler: _SystemService_DeleteMenu_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetMenu",
|
|
Handler: _SystemService_GetMenu_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListMenu",
|
|
Handler: _SystemService_ListMenu_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateOperationLog",
|
|
Handler: _SystemService_CreateOperationLog_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListOperationLog",
|
|
Handler: _SystemService_ListOperationLog_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListConfig",
|
|
Handler: _SystemService_ListConfig_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateConfig",
|
|
Handler: _SystemService_UpdateConfig_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "rpc/system/system.proto",
|
|
}
|