service

package
v0.0.0-...-04312dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTenantToken

func CheckTenantToken(ctx context.Context, token string, tenantId uint) bool

Types

type ITenantService

type ITenantService interface {
	CreateTenant(ctx context.Context, tenant *model.Tenant) error
	UpdateBaseInfo(ctx context.Context, tenant *model.Tenant) error
	UpdateToken(ctx context.Context, tenant *model.Tenant) error
	CreateGroup(ctx context.Context, group *model.Group) error
	CreateResource(ctx context.Context, resource *model.Resource) error
	GroupAddResource(ctx context.Context, groupResource *model.GroupResource) error
	QueryTenantInfoById(ctx context.Context, tenantId uint) (*model.Tenant, error)
	ListTenantUsers(ctx context.Context, tenantId uint) (*vo.TenantVo, error)
	ListGroupUsers(ctx context.Context, groupVo *vo.GroupVo) (*vo.GroupVo, error)
	ListTenantGroups(ctx context.Context, tenantId uint) ([]*model.Group, error)
	ListGroupResource(ctx context.Context, groupId uint) ([]*model.GroupResource, error)
}

func NewTenantService

func NewTenantService(db *gorm.DB) ITenantService

type IUserService

type IUserService interface {
	Login(ctx context.Context, loginVo *vo.LoginVo) (*model.UserLoginVo, error)
	Register(ctx context.Context, user *model.User) error
	CreateUser(ctx context.Context, user *model.User) error
	RemoveUserGroup(ctx context.Context, groupVo *vo.UserGroupVo) error
	AddUserToGroup(ctx context.Context, groupVo *vo.UserGroupVo) error
	RemoveUserTenant(ctx context.Context, groupVo *vo.UserGroupVo) error
	AddUserToTenant(ctx context.Context, groupVo *vo.UserGroupVo) error
	UpdateUserInfo(ctx context.Context, user *model.User) error
	QueryUserInfoById(ctx context.Context, userId uint) (*model.User, error)
	ListUserTenants(ctx context.Context, userId uint) ([]*model.TenantShowVo, error)
	ListUserGroups(ctx context.Context, groupVo *vo.UserGroupVo) ([]*model.Group, error)
	ForgetPassword(ctx context.Context, account string) error
	CheckUserResource(ctx context.Context, vo *vo.UserResourceVo) error
}

func NewUserService

func NewUserService(db *gorm.DB) IUserService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL