// Code generated by goctl. DO NOT EDIT.
// Source: core.proto

package server

import (
	"context"

	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/base"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/department"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/dictionary"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/district"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/login_record"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/oauth_provider"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/role"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/token"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/user"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/user_role"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/logic/user_social"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/internal/svc"
	"git.noahlan.cn/n-admin/n-admin-server/rpc/core/types/core"
)

type CoreServer struct {
	svcCtx *svc.ServiceContext
	core.UnimplementedCoreServer
}

func NewCoreServer(svcCtx *svc.ServiceContext) *CoreServer {
	return &CoreServer{
		svcCtx: svcCtx,
	}
}

func (s *CoreServer) InitDatabase(ctx context.Context, in *core.Empty) (*core.BaseResp, error) {
	l := base.NewInitDatabaseLogic(ctx, s.svcCtx)
	return l.InitDatabase(in)
}

// Role management
func (s *CoreServer) CreateDepartment(ctx context.Context, in *core.DepartmentInfo) (*core.BaseIDResp, error) {
	l := department.NewCreateDepartmentLogic(ctx, s.svcCtx)
	return l.CreateDepartment(in)
}

func (s *CoreServer) UpdateDepartment(ctx context.Context, in *core.DepartmentInfo) (*core.BaseResp, error) {
	l := department.NewUpdateDepartmentLogic(ctx, s.svcCtx)
	return l.UpdateDepartment(in)
}

func (s *CoreServer) GetDepartmentList(ctx context.Context, in *core.DepartmentReq) (*core.DepartmentListResp, error) {
	l := department.NewGetDepartmentListLogic(ctx, s.svcCtx)
	return l.GetDepartmentList(in)
}

func (s *CoreServer) GetDepartment(ctx context.Context, in *core.DepartmentReq) (*core.DepartmentInfo, error) {
	l := department.NewGetDepartmentLogic(ctx, s.svcCtx)
	return l.GetDepartment(in)
}

func (s *CoreServer) DeleteDepartment(ctx context.Context, in *core.IDsReq) (*core.BaseResp, error) {
	l := department.NewDeleteDepartmentLogic(ctx, s.svcCtx)
	return l.DeleteDepartment(in)
}

// Dictionary Management
func (s *CoreServer) CreateDictionary(ctx context.Context, in *core.DictionaryInfo) (*core.BaseIDResp, error) {
	l := dictionary.NewCreateDictionaryLogic(ctx, s.svcCtx)
	return l.CreateDictionary(in)
}

func (s *CoreServer) UpdateDictionary(ctx context.Context, in *core.DictionaryInfo) (*core.BaseResp, error) {
	l := dictionary.NewUpdateDictionaryLogic(ctx, s.svcCtx)
	return l.UpdateDictionary(in)
}

func (s *CoreServer) GetDictionaryList(ctx context.Context, in *core.DictionaryReq) (*core.DictionaryListResp, error) {
	l := dictionary.NewGetDictionaryListLogic(ctx, s.svcCtx)
	return l.GetDictionaryList(in)
}

func (s *CoreServer) GetDictionary(ctx context.Context, in *core.DictionaryReq) (*core.DictionaryInfo, error) {
	l := dictionary.NewGetDictionaryLogic(ctx, s.svcCtx)
	return l.GetDictionary(in)
}

func (s *CoreServer) DeleteDictionary(ctx context.Context, in *core.IDsReq) (*core.BaseResp, error) {
	l := dictionary.NewDeleteDictionaryLogic(ctx, s.svcCtx)
	return l.DeleteDictionary(in)
}

// Details
func (s *CoreServer) CreateDictionaryDetail(ctx context.Context, in *core.DictionaryDetailInfo) (*core.BaseIDResp, error) {
	l := dictionary.NewCreateDictionaryDetailLogic(ctx, s.svcCtx)
	return l.CreateDictionaryDetail(in)
}

func (s *CoreServer) UpdateDictionaryDetail(ctx context.Context, in *core.DictionaryDetailInfo) (*core.BaseResp, error) {
	l := dictionary.NewUpdateDictionaryDetailLogic(ctx, s.svcCtx)
	return l.UpdateDictionaryDetail(in)
}

func (s *CoreServer) GetDictionaryDetailList(ctx context.Context, in *core.DictionaryDetailReq) (*core.DictionaryDetailListResp, error) {
	l := dictionary.NewGetDictionaryDetailListLogic(ctx, s.svcCtx)
	return l.GetDictionaryDetailList(in)
}

func (s *CoreServer) GetDictionaryDetail(ctx context.Context, in *core.DictionaryDetailReq) (*core.DictionaryDetailInfo, error) {
	l := dictionary.NewGetDictionaryDetailLogic(ctx, s.svcCtx)
	return l.GetDictionaryDetail(in)
}

func (s *CoreServer) DeleteDictionaryDetail(ctx context.Context, in *core.DeleteDictionaryDetailReq) (*core.BaseResp, error) {
	l := dictionary.NewDeleteDictionaryDetailLogic(ctx, s.svcCtx)
	return l.DeleteDictionaryDetail(in)
}

// District management
func (s *CoreServer) GetDistrict(ctx context.Context, in *core.DistrictCodeReq) (*core.DistrictInfo, error) {
	l := district.NewGetDistrictLogic(ctx, s.svcCtx)
	return l.GetDistrict(in)
}

func (s *CoreServer) GetDistrictList(ctx context.Context, in *core.DistrictReq) (*core.DistrictListResp, error) {
	l := district.NewGetDistrictListLogic(ctx, s.svcCtx)
	return l.GetDistrictList(in)
}

func (s *CoreServer) GetDistrictTree(ctx context.Context, in *core.DistrictCodeReq) (*core.DistrictTree, error) {
	l := district.NewGetDistrictTreeLogic(ctx, s.svcCtx)
	return l.GetDistrictTree(in)
}

func (s *CoreServer) GetDistrictName(ctx context.Context, in *core.GetDistrictNameReq) (*core.GetDistrictNameResp, error) {
	l := district.NewGetDistrictNameLogic(ctx, s.svcCtx)
	return l.GetDistrictName(in)
}

// Login Record management
func (s *CoreServer) GetRecord(ctx context.Context, in *core.RecordReq) (*core.LoginRecordInfo, error) {
	l := login_record.NewGetRecordLogic(ctx, s.svcCtx)
	return l.GetRecord(in)
}

func (s *CoreServer) Record(ctx context.Context, in *core.LoginRecordInfo) (*core.BaseResp, error) {
	l := login_record.NewRecordLogic(ctx, s.svcCtx)
	return l.Record(in)
}

// OauthProvider management
func (s *CoreServer) CreateOauthProvider(ctx context.Context, in *core.OauthProviderInfo) (*core.BaseIDResp, error) {
	l := oauth_provider.NewCreateOauthProviderLogic(ctx, s.svcCtx)
	return l.CreateOauthProvider(in)
}

func (s *CoreServer) UpdateOauthProvider(ctx context.Context, in *core.OauthProviderInfo) (*core.BaseResp, error) {
	l := oauth_provider.NewUpdateOauthProviderLogic(ctx, s.svcCtx)
	return l.UpdateOauthProvider(in)
}

func (s *CoreServer) GetOauthProviderList(ctx context.Context, in *core.OauthProviderReq) (*core.OauthProviderListResp, error) {
	l := oauth_provider.NewGetOauthProviderListLogic(ctx, s.svcCtx)
	return l.GetOauthProviderList(in)
}

func (s *CoreServer) GetOauthProvider(ctx context.Context, in *core.OauthProviderReq) (*core.OauthProviderInfo, error) {
	l := oauth_provider.NewGetOauthProviderLogic(ctx, s.svcCtx)
	return l.GetOauthProvider(in)
}

func (s *CoreServer) DeleteOauthProvider(ctx context.Context, in *core.IDsReq) (*core.BaseResp, error) {
	l := oauth_provider.NewDeleteOauthProviderLogic(ctx, s.svcCtx)
	return l.DeleteOauthProvider(in)
}

func (s *CoreServer) OauthLogin(ctx context.Context, in *core.OauthLoginReq) (*core.OauthRedirectResp, error) {
	l := oauth_provider.NewOauthLoginLogic(ctx, s.svcCtx)
	return l.OauthLogin(in)
}

func (s *CoreServer) OauthCallback(ctx context.Context, in *core.CallbackReq) (*core.UserInfo, error) {
	l := oauth_provider.NewOauthCallbackLogic(ctx, s.svcCtx)
	return l.OauthCallback(in)
}

// Role management
func (s *CoreServer) CreateRole(ctx context.Context, in *core.RoleInfo) (*core.BaseIDResp, error) {
	l := role.NewCreateRoleLogic(ctx, s.svcCtx)
	return l.CreateRole(in)
}

func (s *CoreServer) UpdateRole(ctx context.Context, in *core.RoleInfo) (*core.BaseResp, error) {
	l := role.NewUpdateRoleLogic(ctx, s.svcCtx)
	return l.UpdateRole(in)
}

func (s *CoreServer) GetRoleList(ctx context.Context, in *core.RoleReq) (*core.RoleListResp, error) {
	l := role.NewGetRoleListLogic(ctx, s.svcCtx)
	return l.GetRoleList(in)
}

func (s *CoreServer) GetRole(ctx context.Context, in *core.RoleReq) (*core.RoleInfo, error) {
	l := role.NewGetRoleLogic(ctx, s.svcCtx)
	return l.GetRole(in)
}

func (s *CoreServer) DeleteRole(ctx context.Context, in *core.IDsReq) (*core.BaseResp, error) {
	l := role.NewDeleteRoleLogic(ctx, s.svcCtx)
	return l.DeleteRole(in)
}

// Token management
func (s *CoreServer) CreateToken(ctx context.Context, in *core.TokenInfo) (*core.BaseIDResp, error) {
	l := token.NewCreateTokenLogic(ctx, s.svcCtx)
	return l.CreateToken(in)
}

func (s *CoreServer) UpdateToken(ctx context.Context, in *core.TokenInfo) (*core.BaseResp, error) {
	l := token.NewUpdateTokenLogic(ctx, s.svcCtx)
	return l.UpdateToken(in)
}

func (s *CoreServer) GetTokenList(ctx context.Context, in *core.TokenReq) (*core.TokenListResp, error) {
	l := token.NewGetTokenListLogic(ctx, s.svcCtx)
	return l.GetTokenList(in)
}

func (s *CoreServer) GetToken(ctx context.Context, in *core.TokenReq) (*core.TokenInfo, error) {
	l := token.NewGetTokenLogic(ctx, s.svcCtx)
	return l.GetToken(in)
}

func (s *CoreServer) DeleteToken(ctx context.Context, in *core.IDsReq) (*core.BaseResp, error) {
	l := token.NewDeleteTokenLogic(ctx, s.svcCtx)
	return l.DeleteToken(in)
}

func (s *CoreServer) BlockUserAllToken(ctx context.Context, in *core.TokenUserReq) (*core.BaseResp, error) {
	l := token.NewBlockUserAllTokenLogic(ctx, s.svcCtx)
	return l.BlockUserAllToken(in)
}

// User Management
func (s *CoreServer) CreateUser(ctx context.Context, in *core.UserInfo) (*core.BaseIDResp, error) {
	l := user.NewCreateUserLogic(ctx, s.svcCtx)
	return l.CreateUser(in)
}

func (s *CoreServer) UpdateUser(ctx context.Context, in *core.UserInfo) (*core.BaseResp, error) {
	l := user.NewUpdateUserLogic(ctx, s.svcCtx)
	return l.UpdateUser(in)
}

func (s *CoreServer) GetUserList(ctx context.Context, in *core.UserReq) (*core.UserListResp, error) {
	l := user.NewGetUserListLogic(ctx, s.svcCtx)
	return l.GetUserList(in)
}

func (s *CoreServer) GetUser(ctx context.Context, in *core.UserReq) (*core.UserInfo, error) {
	l := user.NewGetUserLogic(ctx, s.svcCtx)
	return l.GetUser(in)
}

func (s *CoreServer) DeleteUser(ctx context.Context, in *core.IDsReq) (*core.BaseResp, error) {
	l := user.NewDeleteUserLogic(ctx, s.svcCtx)
	return l.DeleteUser(in)
}

// User-Role Relationship Management
func (s *CoreServer) UserBindRole(ctx context.Context, in *core.UserRoleReq) (*core.BaseResp, error) {
	l := user_role.NewUserBindRoleLogic(ctx, s.svcCtx)
	return l.UserBindRole(in)
}

// UserUnbindRole 用户解绑角色
func (s *CoreServer) UserUnbindRole(ctx context.Context, in *core.UserRoleReq) (*core.BaseResp, error) {
	l := user_role.NewUserUnbindRoleLogic(ctx, s.svcCtx)
	return l.UserUnbindRole(in)
}

// UserClearRole 用户清理角色
func (s *CoreServer) UserClearRole(ctx context.Context, in *core.IDReq) (*core.BaseResp, error) {
	l := user_role.NewUserClearRoleLogic(ctx, s.svcCtx)
	return l.UserClearRole(in)
}

// GetUserRoles 获取用户绑定的角色列表
func (s *CoreServer) GetUserRoles(ctx context.Context, in *core.GetUserRolesReq) (*core.RoleListResp, error) {
	l := user_role.NewGetUserRolesLogic(ctx, s.svcCtx)
	return l.GetUserRoles(in)
}

// User Management
func (s *CoreServer) CreateUserSocial(ctx context.Context, in *core.UserSocialInfo) (*core.BaseIDResp, error) {
	l := user_social.NewCreateUserSocialLogic(ctx, s.svcCtx)
	return l.CreateUserSocial(in)
}

func (s *CoreServer) UpdateUserSocial(ctx context.Context, in *core.UserSocialInfo) (*core.BaseResp, error) {
	l := user_social.NewUpdateUserSocialLogic(ctx, s.svcCtx)
	return l.UpdateUserSocial(in)
}

func (s *CoreServer) GetUserSocialList(ctx context.Context, in *core.UserSocialReq) (*core.UserSocialListResp, error) {
	l := user_social.NewGetUserSocialListLogic(ctx, s.svcCtx)
	return l.GetUserSocialList(in)
}

func (s *CoreServer) GetUserSocial(ctx context.Context, in *core.UserSocialReq) (*core.UserSocialInfo, error) {
	l := user_social.NewGetUserSocialLogic(ctx, s.svcCtx)
	return l.GetUserSocial(in)
}

func (s *CoreServer) DeleteUserSocial(ctx context.Context, in *core.IDsReq) (*core.BaseResp, error) {
	l := user_social.NewDeleteUserSocialLogic(ctx, s.svcCtx)
	return l.DeleteUserSocial(in)
}
