217 lines
9.2 KiB
Go
217 lines
9.2 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.9.2
|
|
// Source: system.proto
|
|
|
|
package systemservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"muyu-apiserver/rpc/system/pb"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
ChangePasswordReq = pb.ChangePasswordReq
|
|
ConfigInfo = pb.ConfigInfo
|
|
CreateLogReq = pb.CreateLogReq
|
|
CreateMenuReq = pb.CreateMenuReq
|
|
CreateRoleReq = pb.CreateRoleReq
|
|
CreateUserReq = pb.CreateUserReq
|
|
DeleteMenuReq = pb.DeleteMenuReq
|
|
DeleteRoleReq = pb.DeleteRoleReq
|
|
DeleteUserReq = pb.DeleteUserReq
|
|
Empty = pb.Empty
|
|
GetMenuReq = pb.GetMenuReq
|
|
GetRoleReq = pb.GetRoleReq
|
|
GetUserReq = pb.GetUserReq
|
|
IdResp = pb.IdResp
|
|
ListConfigReq = pb.ListConfigReq
|
|
ListConfigResp = pb.ListConfigResp
|
|
ListLogReq = pb.ListLogReq
|
|
ListLogResp = pb.ListLogResp
|
|
ListMenuReq = pb.ListMenuReq
|
|
ListMenuResp = pb.ListMenuResp
|
|
ListRoleReq = pb.ListRoleReq
|
|
ListRoleResp = pb.ListRoleResp
|
|
ListUserReq = pb.ListUserReq
|
|
ListUserResp = pb.ListUserResp
|
|
LoginReq = pb.LoginReq
|
|
LoginResp = pb.LoginResp
|
|
MenuInfo = pb.MenuInfo
|
|
OperationLogInfo = pb.OperationLogInfo
|
|
RoleInfo = pb.RoleInfo
|
|
SetRolePermissionsReq = pb.SetRolePermissionsReq
|
|
UpdateConfigReq = pb.UpdateConfigReq
|
|
UpdateMenuReq = pb.UpdateMenuReq
|
|
UpdateRoleReq = pb.UpdateRoleReq
|
|
UpdateUserReq = pb.UpdateUserReq
|
|
UpdateUserStatusReq = pb.UpdateUserStatusReq
|
|
UserInfo = pb.UserInfo
|
|
|
|
SystemService 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)
|
|
}
|
|
|
|
defaultSystemService struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewSystemService(cli zrpc.Client) SystemService {
|
|
return &defaultSystemService{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// Auth
|
|
func (m *defaultSystemService) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.Login(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) ChangePassword(ctx context.Context, in *ChangePasswordReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.ChangePassword(ctx, in, opts...)
|
|
}
|
|
|
|
// User
|
|
func (m *defaultSystemService) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateUser(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateUser(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteUser(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*UserInfo, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetUser(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) ListUser(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.ListUser(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateUserStatus(ctx context.Context, in *UpdateUserStatusReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateUserStatus(ctx, in, opts...)
|
|
}
|
|
|
|
// Role
|
|
func (m *defaultSystemService) CreateRole(ctx context.Context, in *CreateRoleReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateRole(ctx context.Context, in *UpdateRoleReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) DeleteRole(ctx context.Context, in *DeleteRoleReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetRole(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*RoleInfo, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) ListRole(ctx context.Context, in *ListRoleReq, opts ...grpc.CallOption) (*ListRoleResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.ListRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) SetRolePermissions(ctx context.Context, in *SetRolePermissionsReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.SetRolePermissions(ctx, in, opts...)
|
|
}
|
|
|
|
// Menu
|
|
func (m *defaultSystemService) CreateMenu(ctx context.Context, in *CreateMenuReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateMenu(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateMenu(ctx context.Context, in *UpdateMenuReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateMenu(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) DeleteMenu(ctx context.Context, in *DeleteMenuReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteMenu(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetMenu(ctx context.Context, in *GetMenuReq, opts ...grpc.CallOption) (*MenuInfo, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetMenu(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) ListMenu(ctx context.Context, in *ListMenuReq, opts ...grpc.CallOption) (*ListMenuResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.ListMenu(ctx, in, opts...)
|
|
}
|
|
|
|
// Operation Log
|
|
func (m *defaultSystemService) CreateOperationLog(ctx context.Context, in *CreateLogReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateOperationLog(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) ListOperationLog(ctx context.Context, in *ListLogReq, opts ...grpc.CallOption) (*ListLogResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.ListOperationLog(ctx, in, opts...)
|
|
}
|
|
|
|
// Config
|
|
func (m *defaultSystemService) ListConfig(ctx context.Context, in *ListConfigReq, opts ...grpc.CallOption) (*ListConfigResp, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.ListConfig(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateConfig(ctx context.Context, in *UpdateConfigReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
client := pb.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateConfig(ctx, in, opts...)
|
|
}
|