签入脚本
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"easygoadmin/api/v1"
|
||||
)
|
||||
|
||||
// 按模块独立拆分(源:gf gen service 产物手工重组)。
|
||||
// logic 方法签名变更时需同步维护本文件(手维护,勿整体运行 gf gen service)。
|
||||
|
||||
// ITenant 租户服务接口
|
||||
type ITenant interface {
|
||||
// Page 租户分页
|
||||
// 分页结果包含关联用户数
|
||||
Page(ctx context.Context, req *v1.TenantPageReq) (res *v1.TenantPageRes, err error)
|
||||
// List 租户全量列表
|
||||
List(ctx context.Context, req *v1.TenantListReq) (res v1.TenantListRes, err error)
|
||||
// Detail 租户详情
|
||||
Detail(ctx context.Context, req *v1.TenantDetailReq) (res *v1.TenantDetailRes, err error)
|
||||
// Add 新增租户
|
||||
// 编码留空时自动生成,自增回填前先用临时编码占位
|
||||
Add(ctx context.Context, req *v1.TenantAddReq) (res *v1.IdRes, err error)
|
||||
// Update 修改租户
|
||||
// 租户编码不允许变更
|
||||
Update(ctx context.Context, req *v1.TenantUpdateReq) (res *v1.TenantUpdateRes, err error)
|
||||
// Status 租户状态
|
||||
Status(ctx context.Context, req *v1.TenantStatusReq) (res *v1.TenantStatusRes, err error)
|
||||
// Delete 删除租户
|
||||
// 存在关联用户时禁止删除
|
||||
Delete(ctx context.Context, req *v1.TenantDeleteReq) (res *v1.TenantDeleteRes, err error)
|
||||
// BatchDelete 批量删除租户
|
||||
BatchDelete(ctx context.Context, req *v1.TenantBatchDeleteReq) (res *v1.TenantBatchDeleteRes, err error)
|
||||
// Account 创建租户账号
|
||||
// 同时创建租户及其初始管理员账号
|
||||
Account(ctx context.Context, req *v1.TenantAccountReq) (res *v1.TenantAccountRes, err error)
|
||||
// Users 查询租户用户列表
|
||||
Users(ctx context.Context, req *v1.TenantUsersReq) (res *v1.TenantUsersRes, err error)
|
||||
}
|
||||
|
||||
// localTenant 租户服务实现实例
|
||||
var localTenant ITenant
|
||||
|
||||
// Tenant 获取租户服务实例
|
||||
func Tenant() ITenant {
|
||||
if localTenant == nil {
|
||||
panic("implement not found for interface ITenant, forgot register?")
|
||||
}
|
||||
return localTenant
|
||||
}
|
||||
|
||||
// RegisterTenant 注册租户服务实现
|
||||
func RegisterTenant(i ITenant) {
|
||||
localTenant = i
|
||||
}
|
||||
Reference in New Issue
Block a user