198 lines
9.0 KiB
Go
198 lines
9.0 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: system.proto
|
|
|
|
package systemservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"sundynix-micro-go/app/system/rpc/system"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
ClientInfo = system.ClientInfo
|
|
ClientListReq = system.ClientListReq
|
|
ClientListResp = system.ClientListResp
|
|
ClientReq = system.ClientReq
|
|
ClientUpdateReq = system.ClientUpdateReq
|
|
CommonResp = system.CommonResp
|
|
DictInfo = system.DictInfo
|
|
DictListReq = system.DictListReq
|
|
DictListResp = system.DictListResp
|
|
DictReq = system.DictReq
|
|
DictUpdateReq = system.DictUpdateReq
|
|
GetClientByIdReq = system.GetClientByIdReq
|
|
GetClientByIdResp = system.GetClientByIdResp
|
|
GetMenusByRoleIdReq = system.GetMenusByRoleIdReq
|
|
GetMenusByRoleIdResp = system.GetMenusByRoleIdResp
|
|
GetRolesByUserIdReq = system.GetRolesByUserIdReq
|
|
GetRolesByUserIdResp = system.GetRolesByUserIdResp
|
|
IdReq = system.IdReq
|
|
IdsReq = system.IdsReq
|
|
MenuInfo = system.MenuInfo
|
|
MenuListResp = system.MenuListResp
|
|
MenuReq = system.MenuReq
|
|
MenuUpdateReq = system.MenuUpdateReq
|
|
OperationRecordInfo = system.OperationRecordInfo
|
|
OperationRecordListReq = system.OperationRecordListReq
|
|
OperationRecordListResp = system.OperationRecordListResp
|
|
RoleInfo = system.RoleInfo
|
|
RoleListReq = system.RoleListReq
|
|
RoleListResp = system.RoleListResp
|
|
RoleReq = system.RoleReq
|
|
RoleUpdateReq = system.RoleUpdateReq
|
|
|
|
SystemService interface {
|
|
// --- 角色 ---
|
|
GetRolesByUserId(ctx context.Context, in *GetRolesByUserIdReq, opts ...grpc.CallOption) (*GetRolesByUserIdResp, error)
|
|
CreateRole(ctx context.Context, in *RoleReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateRole(ctx context.Context, in *RoleUpdateReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteRole(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetRoleList(ctx context.Context, in *RoleListReq, opts ...grpc.CallOption) (*RoleListResp, error)
|
|
// --- 菜单 ---
|
|
GetMenusByRoleId(ctx context.Context, in *GetMenusByRoleIdReq, opts ...grpc.CallOption) (*GetMenusByRoleIdResp, error)
|
|
CreateMenu(ctx context.Context, in *MenuReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateMenu(ctx context.Context, in *MenuUpdateReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteMenu(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetMenuList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*MenuListResp, error)
|
|
// --- 客户端 ---
|
|
GetClientById(ctx context.Context, in *GetClientByIdReq, opts ...grpc.CallOption) (*GetClientByIdResp, error)
|
|
CreateClient(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateClient(ctx context.Context, in *ClientUpdateReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteClient(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetClientList(ctx context.Context, in *ClientListReq, opts ...grpc.CallOption) (*ClientListResp, error)
|
|
// --- 字典 ---
|
|
CreateDict(ctx context.Context, in *DictReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateDict(ctx context.Context, in *DictUpdateReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteDict(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetDictList(ctx context.Context, in *DictListReq, opts ...grpc.CallOption) (*DictListResp, error)
|
|
// --- 操作日志 ---
|
|
DeleteOperationRecord(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetOperationRecordList(ctx context.Context, in *OperationRecordListReq, opts ...grpc.CallOption) (*OperationRecordListResp, error)
|
|
}
|
|
|
|
defaultSystemService struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewSystemService(cli zrpc.Client) SystemService {
|
|
return &defaultSystemService{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// --- 角色 ---
|
|
func (m *defaultSystemService) GetRolesByUserId(ctx context.Context, in *GetRolesByUserIdReq, opts ...grpc.CallOption) (*GetRolesByUserIdResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetRolesByUserId(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) CreateRole(ctx context.Context, in *RoleReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateRole(ctx context.Context, in *RoleUpdateReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) DeleteRole(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteRole(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetRoleList(ctx context.Context, in *RoleListReq, opts ...grpc.CallOption) (*RoleListResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetRoleList(ctx, in, opts...)
|
|
}
|
|
|
|
// --- 菜单 ---
|
|
func (m *defaultSystemService) GetMenusByRoleId(ctx context.Context, in *GetMenusByRoleIdReq, opts ...grpc.CallOption) (*GetMenusByRoleIdResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetMenusByRoleId(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) CreateMenu(ctx context.Context, in *MenuReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateMenu(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateMenu(ctx context.Context, in *MenuUpdateReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateMenu(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) DeleteMenu(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteMenu(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetMenuList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*MenuListResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetMenuList(ctx, in, opts...)
|
|
}
|
|
|
|
// --- 客户端 ---
|
|
func (m *defaultSystemService) GetClientById(ctx context.Context, in *GetClientByIdReq, opts ...grpc.CallOption) (*GetClientByIdResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetClientById(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) CreateClient(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateClient(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateClient(ctx context.Context, in *ClientUpdateReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateClient(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) DeleteClient(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteClient(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetClientList(ctx context.Context, in *ClientListReq, opts ...grpc.CallOption) (*ClientListResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetClientList(ctx, in, opts...)
|
|
}
|
|
|
|
// --- 字典 ---
|
|
func (m *defaultSystemService) CreateDict(ctx context.Context, in *DictReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.CreateDict(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) UpdateDict(ctx context.Context, in *DictUpdateReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.UpdateDict(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) DeleteDict(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteDict(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetDictList(ctx context.Context, in *DictListReq, opts ...grpc.CallOption) (*DictListResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetDictList(ctx, in, opts...)
|
|
}
|
|
|
|
// --- 操作日志 ---
|
|
func (m *defaultSystemService) DeleteOperationRecord(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.DeleteOperationRecord(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSystemService) GetOperationRecordList(ctx context.Context, in *OperationRecordListReq, opts ...grpc.CallOption) (*OperationRecordListResp, error) {
|
|
client := system.NewSystemServiceClient(m.cli.Conn())
|
|
return client.GetOperationRecordList(ctx, in, opts...)
|
|
}
|