Documentation ¶
Index ¶
- Variables
- type AccountRepo
- type AccountUser
- type Api
- type ApiListReq
- type ApiPageListReq
- type ApiPageListResp
- type ApiRepo
- type ApiUseCase
- func (uc *ApiUseCase) CreateApi(ctx context.Context, a *Api) (int64, error)
- func (uc *ApiUseCase) DeleteApi(ctx context.Context, id int64) error
- func (uc *ApiUseCase) GetApi(ctx context.Context, id int64) (*Api, error)
- func (uc *ApiUseCase) ListApi(ctx context.Context, req *ApiListReq) ([]*Api, error)
- func (uc *ApiUseCase) PageListApi(ctx context.Context, req *ApiPageListReq) (*ApiPageListResp, error)
- func (uc *ApiUseCase) UpdateApi(ctx context.Context, a *Api) error
- type AuthUseCase
- type DictData
- type DictDataListReq
- type DictDataPageListReq
- type DictDataPageListResp
- type DictDataRepo
- type DictDataUseCase
- func (uc *DictDataUseCase) CreateDictData(ctx context.Context, dict *DictData) (int64, error)
- func (uc *DictDataUseCase) DeleteDictData(ctx context.Context, id int64) error
- func (uc *DictDataUseCase) GetDictData(ctx context.Context, id int64) (*DictData, error)
- func (uc *DictDataUseCase) ListDictData(ctx context.Context, req *DictDataListReq) ([]*DictData, error)
- func (uc *DictDataUseCase) PageListDictData(ctx context.Context, req *DictDataPageListReq) (*DictDataPageListResp, error)
- func (uc *DictDataUseCase) UpdateDictData(ctx context.Context, dict *DictData) error
- type DictType
- type DictTypeListReq
- type DictTypePageListReq
- type DictTypePageListResp
- type DictTypeRepo
- type DictTypeUseCase
- func (uc *DictTypeUseCase) CreateDictType(ctx context.Context, dicttype *DictType) (int64, error)
- func (uc *DictTypeUseCase) DeleteDictType(ctx context.Context, id int64) error
- func (uc *DictTypeUseCase) GetDictType(ctx context.Context, id int64) (*DictType, error)
- func (uc *DictTypeUseCase) ListDictType(ctx context.Context, req *DictTypeListReq) ([]*DictType, error)
- func (uc *DictTypeUseCase) PageListDictType(ctx context.Context, req *DictTypePageListReq) (*DictTypePageListResp, error)
- func (uc *DictTypeUseCase) UpdateDictType(ctx context.Context, dicttype *DictType) error
- type Role
- type RoleListReq
- type RolePageListReq
- type RolePageListResp
- type RoleRepo
- type RoleUseCase
- func (uc *RoleUseCase) CreateRole(ctx context.Context, role *Role) (int64, error)
- func (uc *RoleUseCase) DeleteRole(ctx context.Context, id int64) error
- func (uc *RoleUseCase) GetRole(ctx context.Context, id int64) (*Role, error)
- func (uc *RoleUseCase) ListRole(ctx context.Context, req *RoleListReq) ([]*Role, error)
- func (uc *RoleUseCase) PageListRole(ctx context.Context, req *RolePageListReq) (*RolePageListResp, error)
- func (uc *RoleUseCase) UpdateRole(ctx context.Context, role *Role) error
- type User
- type UserListReq
- type UserPageListReq
- type UserPageListResp
- type UserRepo
- type UserRole
- type UserRoles
- type UserUseCase
- func (uc *UserUseCase) CreateUser(ctx context.Context, user *User) (int64, error)
- func (uc *UserUseCase) DeleteUser(ctx context.Context, id int64) error
- func (uc *UserUseCase) GetUser(ctx context.Context, id int64) (*User, error)
- func (uc *UserUseCase) ListUser(ctx context.Context, req *UserListReq) ([]*User, error)
- func (uc *UserUseCase) PageListUser(ctx context.Context, req *UserPageListReq) (*UserPageListResp, error)
- func (uc *UserUseCase) UpdateUser(ctx context.Context, user *User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewUserUseCase, NewRoleUseCase, NewAuthUseCase, NewDictDataUseCase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type AccountRepo ¶
type AccountRepo interface { Register(ctx context.Context, u *AccountUser) (int64, error) Login(ctx context.Context, u *AccountUser) (*AccountUser, error) }
type AccountUser ¶
type ApiListReq ¶
type ApiListReq struct {
ApiTypeTd int64
}
type ApiPageListReq ¶
type ApiPageListResp ¶
type ApiRepo ¶
type ApiRepo interface { CreateApi(ctx context.Context, a *Api) (int64, error) UpdateApi(ctx context.Context, a *Api) error DeleteApi(ctx context.Context, id int64) error GetApi(ctx context.Context, id int64) (*Api, error) ListApi(ctx context.Context, req *ApiListReq) ([]*Api, error) PageListApi(ctx context.Context, req *ApiPageListReq) (*ApiPageListResp, error) }
type ApiUseCase ¶
type ApiUseCase struct {
// contains filtered or unexported fields
}
func NewApiUseCase ¶
func NewApiUseCase(repo ApiRepo, logger log.Logger) *ApiUseCase
func (*ApiUseCase) ListApi ¶
func (uc *ApiUseCase) ListApi(ctx context.Context, req *ApiListReq) ([]*Api, error)
func (*ApiUseCase) PageListApi ¶
func (uc *ApiUseCase) PageListApi(ctx context.Context, req *ApiPageListReq) (*ApiPageListResp, error)
type AuthUseCase ¶
type AuthUseCase struct {
// contains filtered or unexported fields
}
func NewAuthUseCase ¶
func NewAuthUseCase(conf *conf.Auth, userRepo UserRepo, accountRepo AccountRepo) *AuthUseCase
func (*AuthUseCase) Login ¶
func (uc *AuthUseCase) Login(ctx context.Context, u *AccountUser) (*AccountUser, error)
func (*AuthUseCase) Register ¶
func (uc *AuthUseCase) Register(ctx context.Context, u *AccountUser) (int64, error)
type DictDataListReq ¶
type DictDataListReq struct {
DictTypeId int64
}
type DictDataPageListReq ¶
type DictDataPageListResp ¶
type DictDataRepo ¶
type DictDataRepo interface { CreateDictData(ctx context.Context, dict *DictData) (int64, error) UpdateDictData(ctx context.Context, dict *DictData) error DeleteDictData(ctx context.Context, id int64) error GetDictData(ctx context.Context, id int64) (*DictData, error) ListDictData(ctx context.Context, req *DictDataListReq) ([]*DictData, error) PageListDictData(ctx context.Context, req *DictDataPageListReq) (*DictDataPageListResp, error) }
type DictDataUseCase ¶
type DictDataUseCase struct {
// contains filtered or unexported fields
}
func NewDictDataUseCase ¶
func NewDictDataUseCase(repo DictDataRepo, logger log.Logger) *DictDataUseCase
func (*DictDataUseCase) CreateDictData ¶
func (*DictDataUseCase) DeleteDictData ¶
func (uc *DictDataUseCase) DeleteDictData(ctx context.Context, id int64) error
func (*DictDataUseCase) GetDictData ¶
func (*DictDataUseCase) ListDictData ¶
func (uc *DictDataUseCase) ListDictData(ctx context.Context, req *DictDataListReq) ([]*DictData, error)
func (*DictDataUseCase) PageListDictData ¶
func (uc *DictDataUseCase) PageListDictData(ctx context.Context, req *DictDataPageListReq) (*DictDataPageListResp, error)
func (*DictDataUseCase) UpdateDictData ¶
func (uc *DictDataUseCase) UpdateDictData(ctx context.Context, dict *DictData) error
type DictTypeListReq ¶
type DictTypePageListReq ¶
type DictTypePageListResp ¶
type DictTypeRepo ¶
type DictTypeRepo interface { CreateDictType(ctx context.Context, dicttype *DictType) (int64, error) UpdateDictType(ctx context.Context, dicttype *DictType) error DeleteDictType(ctx context.Context, id int64) error GetDictType(ctx context.Context, id int64) (*DictType, error) ListDictType(ctx context.Context, req *DictTypeListReq) ([]*DictType, error) PageListDictType(ctx context.Context, req *DictTypePageListReq) (*DictTypePageListResp, error) }
type DictTypeUseCase ¶
type DictTypeUseCase struct {
// contains filtered or unexported fields
}
func NewDictTypeUseCase ¶
func NewDictTypeUseCase(repo DictTypeRepo, logger log.Logger) *DictTypeUseCase
func (*DictTypeUseCase) CreateDictType ¶
func (*DictTypeUseCase) DeleteDictType ¶
func (uc *DictTypeUseCase) DeleteDictType(ctx context.Context, id int64) error
func (*DictTypeUseCase) GetDictType ¶
func (*DictTypeUseCase) ListDictType ¶
func (uc *DictTypeUseCase) ListDictType(ctx context.Context, req *DictTypeListReq) ([]*DictType, error)
func (*DictTypeUseCase) PageListDictType ¶
func (uc *DictTypeUseCase) PageListDictType(ctx context.Context, req *DictTypePageListReq) (*DictTypePageListResp, error)
func (*DictTypeUseCase) UpdateDictType ¶
func (uc *DictTypeUseCase) UpdateDictType(ctx context.Context, dicttype *DictType) error
type RoleListReq ¶
type RoleListReq struct { }
type RolePageListReq ¶
type RolePageListResp ¶
type RoleRepo ¶
type RoleRepo interface { CreateRole(ctx context.Context, role *Role) (int64, error) UpdateRole(ctx context.Context, role *Role) error DeleteRole(ctx context.Context, id int64) error GetRole(ctx context.Context, id int64) (*Role, error) ListRole(ctx context.Context, req *RoleListReq) ([]*Role, error) PageListRole(ctx context.Context, req *RolePageListReq) (*RolePageListResp, error) }
type RoleUseCase ¶
type RoleUseCase struct {
// contains filtered or unexported fields
}
func NewRoleUseCase ¶
func NewRoleUseCase(repo RoleRepo, enforcer *casbin.Enforcer, logger log.Logger) *RoleUseCase
func (*RoleUseCase) CreateRole ¶
func (*RoleUseCase) DeleteRole ¶
func (uc *RoleUseCase) DeleteRole(ctx context.Context, id int64) error
func (*RoleUseCase) ListRole ¶
func (uc *RoleUseCase) ListRole(ctx context.Context, req *RoleListReq) ([]*Role, error)
func (*RoleUseCase) PageListRole ¶
func (uc *RoleUseCase) PageListRole(ctx context.Context, req *RolePageListReq) (*RolePageListResp, error)
func (*RoleUseCase) UpdateRole ¶
func (uc *RoleUseCase) UpdateRole(ctx context.Context, role *Role) error
type UserListReq ¶
type UserListReq struct { }
type UserPageListReq ¶
type UserPageListResp ¶
type UserRepo ¶
type UserRepo interface { CreateUser(ctx context.Context, user *User) (int64, error) UpdateUser(ctx context.Context, user *User) error DeleteUser(ctx context.Context, id int64) error GetUser(ctx context.Context, id int64) (*User, error) ListUser(ctx context.Context, req *UserListReq) ([]*User, error) PageListUser(ctx context.Context, req *UserPageListReq) (*UserPageListResp, error) }
type UserUseCase ¶
type UserUseCase struct {
// contains filtered or unexported fields
}
func NewUserUseCase ¶
func NewUserUseCase(repo UserRepo, enforcer *casbin.Enforcer, logger log.Logger) *UserUseCase
func (*UserUseCase) CreateUser ¶
func (*UserUseCase) DeleteUser ¶
func (uc *UserUseCase) DeleteUser(ctx context.Context, id int64) error
func (*UserUseCase) ListUser ¶
func (uc *UserUseCase) ListUser(ctx context.Context, req *UserListReq) ([]*User, error)
func (*UserUseCase) PageListUser ¶
func (uc *UserUseCase) PageListUser(ctx context.Context, req *UserPageListReq) (*UserPageListResp, error)
func (*UserUseCase) UpdateUser ¶
func (uc *UserUseCase) UpdateUser(ctx context.Context, user *User) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.