muyu-apiserver/rpc/system/internal/server/systemserviceserver.go

146 lines
4.6 KiB
Go
Raw Permalink Normal View History

// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2
// Source: system.proto
package server
import (
"context"
"muyu-apiserver/rpc/system/internal/logic"
"muyu-apiserver/rpc/system/internal/svc"
"muyu-apiserver/rpc/system/pb"
)
type SystemServiceServer struct {
svcCtx *svc.ServiceContext
pb.UnimplementedSystemServiceServer
}
func NewSystemServiceServer(svcCtx *svc.ServiceContext) *SystemServiceServer {
return &SystemServiceServer{
svcCtx: svcCtx,
}
}
// Auth
func (s *SystemServiceServer) Login(ctx context.Context, in *pb.LoginReq) (*pb.LoginResp, error) {
l := logic.NewLoginLogic(ctx, s.svcCtx)
return l.Login(in)
}
func (s *SystemServiceServer) ChangePassword(ctx context.Context, in *pb.ChangePasswordReq) (*pb.Empty, error) {
l := logic.NewChangePasswordLogic(ctx, s.svcCtx)
return l.ChangePassword(in)
}
// User
func (s *SystemServiceServer) CreateUser(ctx context.Context, in *pb.CreateUserReq) (*pb.IdResp, error) {
l := logic.NewCreateUserLogic(ctx, s.svcCtx)
return l.CreateUser(in)
}
func (s *SystemServiceServer) UpdateUser(ctx context.Context, in *pb.UpdateUserReq) (*pb.Empty, error) {
l := logic.NewUpdateUserLogic(ctx, s.svcCtx)
return l.UpdateUser(in)
}
func (s *SystemServiceServer) DeleteUser(ctx context.Context, in *pb.DeleteUserReq) (*pb.Empty, error) {
l := logic.NewDeleteUserLogic(ctx, s.svcCtx)
return l.DeleteUser(in)
}
func (s *SystemServiceServer) GetUser(ctx context.Context, in *pb.GetUserReq) (*pb.UserInfo, error) {
l := logic.NewGetUserLogic(ctx, s.svcCtx)
return l.GetUser(in)
}
func (s *SystemServiceServer) ListUser(ctx context.Context, in *pb.ListUserReq) (*pb.ListUserResp, error) {
l := logic.NewListUserLogic(ctx, s.svcCtx)
return l.ListUser(in)
}
func (s *SystemServiceServer) UpdateUserStatus(ctx context.Context, in *pb.UpdateUserStatusReq) (*pb.Empty, error) {
l := logic.NewUpdateUserStatusLogic(ctx, s.svcCtx)
return l.UpdateUserStatus(in)
}
// Role
func (s *SystemServiceServer) CreateRole(ctx context.Context, in *pb.CreateRoleReq) (*pb.IdResp, error) {
l := logic.NewCreateRoleLogic(ctx, s.svcCtx)
return l.CreateRole(in)
}
func (s *SystemServiceServer) UpdateRole(ctx context.Context, in *pb.UpdateRoleReq) (*pb.Empty, error) {
l := logic.NewUpdateRoleLogic(ctx, s.svcCtx)
return l.UpdateRole(in)
}
func (s *SystemServiceServer) DeleteRole(ctx context.Context, in *pb.DeleteRoleReq) (*pb.Empty, error) {
l := logic.NewDeleteRoleLogic(ctx, s.svcCtx)
return l.DeleteRole(in)
}
func (s *SystemServiceServer) GetRole(ctx context.Context, in *pb.GetRoleReq) (*pb.RoleInfo, error) {
l := logic.NewGetRoleLogic(ctx, s.svcCtx)
return l.GetRole(in)
}
func (s *SystemServiceServer) ListRole(ctx context.Context, in *pb.ListRoleReq) (*pb.ListRoleResp, error) {
l := logic.NewListRoleLogic(ctx, s.svcCtx)
return l.ListRole(in)
}
func (s *SystemServiceServer) SetRolePermissions(ctx context.Context, in *pb.SetRolePermissionsReq) (*pb.Empty, error) {
l := logic.NewSetRolePermissionsLogic(ctx, s.svcCtx)
return l.SetRolePermissions(in)
}
// Menu
func (s *SystemServiceServer) CreateMenu(ctx context.Context, in *pb.CreateMenuReq) (*pb.IdResp, error) {
l := logic.NewCreateMenuLogic(ctx, s.svcCtx)
return l.CreateMenu(in)
}
func (s *SystemServiceServer) UpdateMenu(ctx context.Context, in *pb.UpdateMenuReq) (*pb.Empty, error) {
l := logic.NewUpdateMenuLogic(ctx, s.svcCtx)
return l.UpdateMenu(in)
}
func (s *SystemServiceServer) DeleteMenu(ctx context.Context, in *pb.DeleteMenuReq) (*pb.Empty, error) {
l := logic.NewDeleteMenuLogic(ctx, s.svcCtx)
return l.DeleteMenu(in)
}
func (s *SystemServiceServer) GetMenu(ctx context.Context, in *pb.GetMenuReq) (*pb.MenuInfo, error) {
l := logic.NewGetMenuLogic(ctx, s.svcCtx)
return l.GetMenu(in)
}
func (s *SystemServiceServer) ListMenu(ctx context.Context, in *pb.ListMenuReq) (*pb.ListMenuResp, error) {
l := logic.NewListMenuLogic(ctx, s.svcCtx)
return l.ListMenu(in)
}
// Operation Log
func (s *SystemServiceServer) CreateOperationLog(ctx context.Context, in *pb.CreateLogReq) (*pb.Empty, error) {
l := logic.NewCreateOperationLogLogic(ctx, s.svcCtx)
return l.CreateOperationLog(in)
}
func (s *SystemServiceServer) ListOperationLog(ctx context.Context, in *pb.ListLogReq) (*pb.ListLogResp, error) {
l := logic.NewListOperationLogLogic(ctx, s.svcCtx)
return l.ListOperationLog(in)
}
// Config
func (s *SystemServiceServer) ListConfig(ctx context.Context, in *pb.ListConfigReq) (*pb.ListConfigResp, error) {
l := logic.NewListConfigLogic(ctx, s.svcCtx)
return l.ListConfig(in)
}
func (s *SystemServiceServer) UpdateConfig(ctx context.Context, in *pb.UpdateConfigReq) (*pb.Empty, error) {
l := logic.NewUpdateConfigLogic(ctx, s.svcCtx)
return l.UpdateConfig(in)
}