|
|
|
// Code generated by goctl. DO NOT EDIT.
|
|
|
|
// Source: core.proto
|
|
|
|
|
|
|
|
package coreclient
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"git.noahlan.cn/n-admin/n-admin-server/rpc/core/types/core"
|
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
BaseIDResp = core.BaseIDResp
|
|
|
|
BaseResp = core.BaseResp
|
|
|
|
CallbackReq = core.CallbackReq
|
|
|
|
DeleteDictionaryDetailReq = core.DeleteDictionaryDetailReq
|
|
|
|
DepartmentInfo = core.DepartmentInfo
|
|
|
|
DepartmentListResp = core.DepartmentListResp
|
|
|
|
DepartmentReq = core.DepartmentReq
|
|
|
|
DictionaryDetailInfo = core.DictionaryDetailInfo
|
|
|
|
DictionaryDetailListResp = core.DictionaryDetailListResp
|
|
|
|
DictionaryDetailReq = core.DictionaryDetailReq
|
|
|
|
DictionaryInfo = core.DictionaryInfo
|
|
|
|
DictionaryListResp = core.DictionaryListResp
|
|
|
|
DictionaryReq = core.DictionaryReq
|
|
|
|
DistrictCodeReq = core.DistrictCodeReq
|
|
|
|
DistrictInfo = core.DistrictInfo
|
|
|
|
DistrictListResp = core.DistrictListResp
|
|
|
|
DistrictReq = core.DistrictReq
|
|
|
|
DistrictTree = core.DistrictTree
|
|
|
|
Empty = core.Empty
|
|
|
|
GetDistrictNameReq = core.GetDistrictNameReq
|
|
|
|
GetDistrictNameResp = core.GetDistrictNameResp
|
|
|
|
GetUserRolesReq = core.GetUserRolesReq
|
|
|
|
IDReq = core.IDReq
|
|
|
|
IDsReq = core.IDsReq
|
|
|
|
LoginRecordInfo = core.LoginRecordInfo
|
|
|
|
OauthLoginReq = core.OauthLoginReq
|
|
|
|
OauthProviderInfo = core.OauthProviderInfo
|
|
|
|
OauthProviderListResp = core.OauthProviderListResp
|
|
|
|
OauthProviderReq = core.OauthProviderReq
|
|
|
|
OauthRedirectResp = core.OauthRedirectResp
|
|
|
|
Pagination = core.Pagination
|
|
|
|
RecordReq = core.RecordReq
|
|
|
|
RoleInfo = core.RoleInfo
|
|
|
|
RoleListResp = core.RoleListResp
|
|
|
|
RoleReq = core.RoleReq
|
|
|
|
TokenInfo = core.TokenInfo
|
|
|
|
TokenListResp = core.TokenListResp
|
|
|
|
TokenReq = core.TokenReq
|
|
|
|
TokenUserReq = core.TokenUserReq
|
|
|
|
UserInfo = core.UserInfo
|
|
|
|
UserListResp = core.UserListResp
|
|
|
|
UserReq = core.UserReq
|
|
|
|
UserRoleReq = core.UserRoleReq
|
|
|
|
UserSocialInfo = core.UserSocialInfo
|
|
|
|
UserSocialListResp = core.UserSocialListResp
|
|
|
|
UserSocialReq = core.UserSocialReq
|
|
|
|
|
|
|
|
Core interface {
|
|
|
|
InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// Role management
|
|
|
|
CreateDepartment(ctx context.Context, in *DepartmentInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateDepartment(ctx context.Context, in *DepartmentInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetDepartmentList(ctx context.Context, in *DepartmentReq, opts ...grpc.CallOption) (*DepartmentListResp, error)
|
|
|
|
GetDepartment(ctx context.Context, in *DepartmentReq, opts ...grpc.CallOption) (*DepartmentInfo, error)
|
|
|
|
DeleteDepartment(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// Dictionary Management
|
|
|
|
CreateDictionary(ctx context.Context, in *DictionaryInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateDictionary(ctx context.Context, in *DictionaryInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetDictionaryList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserListResp, error)
|
|
|
|
GetDictionary(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*DictionaryInfo, error)
|
|
|
|
DeleteDictionary(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// Details
|
|
|
|
CreateDictionaryDetail(ctx context.Context, in *DictionaryDetailInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateDictionaryDetail(ctx context.Context, in *DictionaryDetailInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetDictionaryDetailList(ctx context.Context, in *DictionaryDetailReq, opts ...grpc.CallOption) (*DictionaryDetailListResp, error)
|
|
|
|
GetDictionaryDetail(ctx context.Context, in *DictionaryDetailReq, opts ...grpc.CallOption) (*DictionaryDetailInfo, error)
|
|
|
|
DeleteDictionaryDetail(ctx context.Context, in *DeleteDictionaryDetailReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// District management
|
|
|
|
GetDistrict(ctx context.Context, in *DistrictCodeReq, opts ...grpc.CallOption) (*DistrictInfo, error)
|
|
|
|
GetDistrictList(ctx context.Context, in *DistrictReq, opts ...grpc.CallOption) (*DistrictListResp, error)
|
|
|
|
GetDistrictTree(ctx context.Context, in *DistrictCodeReq, opts ...grpc.CallOption) (*DistrictTree, error)
|
|
|
|
GetDistrictName(ctx context.Context, in *GetDistrictNameReq, opts ...grpc.CallOption) (*GetDistrictNameResp, error)
|
|
|
|
// Login Record management
|
|
|
|
GetRecord(ctx context.Context, in *RecordReq, opts ...grpc.CallOption) (*LoginRecordInfo, error)
|
|
|
|
Record(ctx context.Context, in *LoginRecordInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// OauthProvider management
|
|
|
|
CreateOauthProvider(ctx context.Context, in *OauthProviderInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateOauthProvider(ctx context.Context, in *OauthProviderInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetOauthProviderList(ctx context.Context, in *OauthProviderReq, opts ...grpc.CallOption) (*OauthProviderListResp, error)
|
|
|
|
GetOauthProvider(ctx context.Context, in *OauthProviderReq, opts ...grpc.CallOption) (*OauthProviderInfo, error)
|
|
|
|
DeleteOauthProvider(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
OauthLogin(ctx context.Context, in *OauthLoginReq, opts ...grpc.CallOption) (*OauthRedirectResp, error)
|
|
|
|
OauthCallback(ctx context.Context, in *CallbackReq, opts ...grpc.CallOption) (*UserInfo, error)
|
|
|
|
// Role management
|
|
|
|
CreateRole(ctx context.Context, in *RoleInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateRole(ctx context.Context, in *RoleInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetRoleList(ctx context.Context, in *RoleReq, opts ...grpc.CallOption) (*RoleListResp, error)
|
|
|
|
GetRole(ctx context.Context, in *RoleReq, opts ...grpc.CallOption) (*RoleInfo, error)
|
|
|
|
DeleteRole(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// Token management
|
|
|
|
CreateToken(ctx context.Context, in *TokenInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateToken(ctx context.Context, in *TokenInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetTokenList(ctx context.Context, in *TokenReq, opts ...grpc.CallOption) (*TokenListResp, error)
|
|
|
|
GetToken(ctx context.Context, in *TokenReq, opts ...grpc.CallOption) (*TokenInfo, error)
|
|
|
|
DeleteToken(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
BlockUserAllToken(ctx context.Context, in *TokenUserReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// User Management
|
|
|
|
CreateUser(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateUser(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetUserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserListResp, error)
|
|
|
|
GetUser(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserInfo, error)
|
|
|
|
DeleteUser(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// User-Role Relationship Management
|
|
|
|
UserBindRole(ctx context.Context, in *UserRoleReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// UserUnbindRole 用户解绑角色
|
|
|
|
UserUnbindRole(ctx context.Context, in *UserRoleReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// UserClearRole 用户清理角色
|
|
|
|
UserClearRole(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
// GetUserRoles 获取用户绑定的角色列表
|
|
|
|
GetUserRoles(ctx context.Context, in *GetUserRolesReq, opts ...grpc.CallOption) (*RoleListResp, error)
|
|
|
|
// User Management
|
|
|
|
CreateUserSocial(ctx context.Context, in *UserSocialInfo, opts ...grpc.CallOption) (*BaseIDResp, error)
|
|
|
|
UpdateUserSocial(ctx context.Context, in *UserSocialInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
GetUserSocialList(ctx context.Context, in *UserSocialReq, opts ...grpc.CallOption) (*UserSocialListResp, error)
|
|
|
|
GetUserSocial(ctx context.Context, in *UserSocialReq, opts ...grpc.CallOption) (*UserSocialInfo, error)
|
|
|
|
DeleteUserSocial(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultCore struct {
|
|
|
|
cli zrpc.Client
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func NewCore(cli zrpc.Client) Core {
|
|
|
|
return &defaultCore{
|
|
|
|
cli: cli,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.InitDatabase(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Role management
|
|
|
|
func (m *defaultCore) CreateDepartment(ctx context.Context, in *DepartmentInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateDepartment(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateDepartment(ctx context.Context, in *DepartmentInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateDepartment(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDepartmentList(ctx context.Context, in *DepartmentReq, opts ...grpc.CallOption) (*DepartmentListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDepartmentList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDepartment(ctx context.Context, in *DepartmentReq, opts ...grpc.CallOption) (*DepartmentInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDepartment(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteDepartment(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteDepartment(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Dictionary Management
|
|
|
|
func (m *defaultCore) CreateDictionary(ctx context.Context, in *DictionaryInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateDictionary(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateDictionary(ctx context.Context, in *DictionaryInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateDictionary(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDictionaryList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDictionaryList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDictionary(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*DictionaryInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDictionary(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteDictionary(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteDictionary(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Details
|
|
|
|
func (m *defaultCore) CreateDictionaryDetail(ctx context.Context, in *DictionaryDetailInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateDictionaryDetail(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateDictionaryDetail(ctx context.Context, in *DictionaryDetailInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateDictionaryDetail(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDictionaryDetailList(ctx context.Context, in *DictionaryDetailReq, opts ...grpc.CallOption) (*DictionaryDetailListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDictionaryDetailList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDictionaryDetail(ctx context.Context, in *DictionaryDetailReq, opts ...grpc.CallOption) (*DictionaryDetailInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDictionaryDetail(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteDictionaryDetail(ctx context.Context, in *DeleteDictionaryDetailReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteDictionaryDetail(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// District management
|
|
|
|
func (m *defaultCore) GetDistrict(ctx context.Context, in *DistrictCodeReq, opts ...grpc.CallOption) (*DistrictInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDistrict(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDistrictList(ctx context.Context, in *DistrictReq, opts ...grpc.CallOption) (*DistrictListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDistrictList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDistrictTree(ctx context.Context, in *DistrictCodeReq, opts ...grpc.CallOption) (*DistrictTree, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDistrictTree(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetDistrictName(ctx context.Context, in *GetDistrictNameReq, opts ...grpc.CallOption) (*GetDistrictNameResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetDistrictName(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Login Record management
|
|
|
|
func (m *defaultCore) GetRecord(ctx context.Context, in *RecordReq, opts ...grpc.CallOption) (*LoginRecordInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetRecord(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) Record(ctx context.Context, in *LoginRecordInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.Record(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// OauthProvider management
|
|
|
|
func (m *defaultCore) CreateOauthProvider(ctx context.Context, in *OauthProviderInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateOauthProvider(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateOauthProvider(ctx context.Context, in *OauthProviderInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateOauthProvider(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetOauthProviderList(ctx context.Context, in *OauthProviderReq, opts ...grpc.CallOption) (*OauthProviderListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetOauthProviderList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetOauthProvider(ctx context.Context, in *OauthProviderReq, opts ...grpc.CallOption) (*OauthProviderInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetOauthProvider(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteOauthProvider(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteOauthProvider(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) OauthLogin(ctx context.Context, in *OauthLoginReq, opts ...grpc.CallOption) (*OauthRedirectResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.OauthLogin(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) OauthCallback(ctx context.Context, in *CallbackReq, opts ...grpc.CallOption) (*UserInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.OauthCallback(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Role management
|
|
|
|
func (m *defaultCore) CreateRole(ctx context.Context, in *RoleInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateRole(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateRole(ctx context.Context, in *RoleInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateRole(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetRoleList(ctx context.Context, in *RoleReq, opts ...grpc.CallOption) (*RoleListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetRoleList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetRole(ctx context.Context, in *RoleReq, opts ...grpc.CallOption) (*RoleInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetRole(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteRole(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteRole(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Token management
|
|
|
|
func (m *defaultCore) CreateToken(ctx context.Context, in *TokenInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateToken(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateToken(ctx context.Context, in *TokenInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateToken(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetTokenList(ctx context.Context, in *TokenReq, opts ...grpc.CallOption) (*TokenListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetTokenList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetToken(ctx context.Context, in *TokenReq, opts ...grpc.CallOption) (*TokenInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetToken(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteToken(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteToken(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) BlockUserAllToken(ctx context.Context, in *TokenUserReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.BlockUserAllToken(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// User Management
|
|
|
|
func (m *defaultCore) CreateUser(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateUser(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateUser(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateUser(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetUserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetUserList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetUser(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetUser(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteUser(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteUser(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// User-Role Relationship Management
|
|
|
|
func (m *defaultCore) UserBindRole(ctx context.Context, in *UserRoleReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UserBindRole(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UserUnbindRole 用户解绑角色
|
|
|
|
func (m *defaultCore) UserUnbindRole(ctx context.Context, in *UserRoleReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UserUnbindRole(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UserClearRole 用户清理角色
|
|
|
|
func (m *defaultCore) UserClearRole(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UserClearRole(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetUserRoles 获取用户绑定的角色列表
|
|
|
|
func (m *defaultCore) GetUserRoles(ctx context.Context, in *GetUserRolesReq, opts ...grpc.CallOption) (*RoleListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetUserRoles(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// User Management
|
|
|
|
func (m *defaultCore) CreateUserSocial(ctx context.Context, in *UserSocialInfo, opts ...grpc.CallOption) (*BaseIDResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.CreateUserSocial(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) UpdateUserSocial(ctx context.Context, in *UserSocialInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.UpdateUserSocial(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetUserSocialList(ctx context.Context, in *UserSocialReq, opts ...grpc.CallOption) (*UserSocialListResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetUserSocialList(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) GetUserSocial(ctx context.Context, in *UserSocialReq, opts ...grpc.CallOption) (*UserSocialInfo, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.GetUserSocial(ctx, in, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *defaultCore) DeleteUserSocial(ctx context.Context, in *IDsReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
|
|
|
client := core.NewCoreClient(m.cli.Conn())
|
|
|
|
return client.DeleteUserSocial(ctx, in, opts...)
|
|
|
|
}
|