Documentation
¶
Index ¶
- Variables
- func EncryptPassword(password string) string
- type Corp
- type CorpFactory
- type CorpRepository
- func (this *CorpRepository) GetCorpById(id int) *Corp
- func (this *CorpRepository) GetCorpByName(name string) *Corp
- func (this *CorpRepository) GetCorps(filters eel.Map) []*Corp
- func (this *CorpRepository) GetCorpsByIds(ids []int) []*Corp
- func (this *CorpRepository) GetPagedCorps(filters eel.Map, page *eel.PageInfo) ([]*Corp, eel.INextPageInfo)
- type CorpUser
- type CorpUserRepository
- func (this *CorpUserRepository) GetCorpUserById(id int) *CorpUser
- func (this *CorpUserRepository) GetCorpUserInCorp(id int, corp business.ICorp) *CorpUser
- func (this *CorpUserRepository) GetCorpUsers(filters eel.Map) []*CorpUser
- func (this *CorpUserRepository) GetCorpUsersByIds(ids []int) []*CorpUser
- func (this *CorpUserRepository) GetPagedCorpUsers(filters eel.Map, page *eel.PageInfo) ([]*CorpUser, eel.INextPageInfo)
- type CorpUserService
- type EncodeCorpService
- type EncodeCorpUserService
- type FillCorpService
- type FillCorpUserService
- type RCorp
- type RCorpUser
Constants ¶
This section is empty.
Variables ¶
View Source
var SUPER_PASSWORD = ""
Functions ¶
func EncryptPassword ¶
Types ¶
type Corp ¶
type Corp struct {
eel.EntityBase
Id int
Code string
Name string
Logo string
Remark string
IsActive bool
IsPlatform bool
CreatedAt time.Time
CorpUser *CorpUser
}
func GetCorpFromContext ¶
func (*Corp) AddCorpUser ¶
func (this *Corp) AddCorpUser(username string, password string, realname string, groupNames []string, isManager bool) error
AddCorpUser 为corp创建登录账号
func (*Corp) FillWithModel ¶
func (*Corp) GetUnionid ¶
type CorpFactory ¶
type CorpFactory struct {
eel.ServiceBase
}
func NewCorpFactory ¶
func NewCorpFactory(ctx context.Context) *CorpFactory
func (*CorpFactory) CreateCorp ¶
func (this *CorpFactory) CreateCorp(name string) (*Corp, error)
func (*CorpFactory) CreatePlatformCorp ¶
func (this *CorpFactory) CreatePlatformCorp(name string) (*Corp, error)
type CorpRepository ¶
type CorpRepository struct {
eel.RepositoryBase
}
func NewCorpRepository ¶
func NewCorpRepository(ctx context.Context) *CorpRepository
func (*CorpRepository) GetCorpById ¶
func (this *CorpRepository) GetCorpById(id int) *Corp
func (*CorpRepository) GetCorpByName ¶
func (this *CorpRepository) GetCorpByName(name string) *Corp
func (*CorpRepository) GetCorpsByIds ¶
func (this *CorpRepository) GetCorpsByIds(ids []int) []*Corp
func (*CorpRepository) GetPagedCorps ¶
func (this *CorpRepository) GetPagedCorps(filters eel.Map, page *eel.PageInfo) ([]*Corp, eel.INextPageInfo)
type CorpUser ¶
type CorpUser struct {
eel.EntityBase
Id int
CorpId int
IsActive bool
IsManager bool
Username string
RealName string
CreatedAt time.Time
Groups []*auth.Group
Corp *Corp
}
func NewCorpUserFromModel ¶
func (*CorpUser) GetJWTToken ¶
func (*CorpUser) GetJWTTokenData ¶
func (*CorpUser) ResetPassword ¶
type CorpUserRepository ¶
type CorpUserRepository struct {
eel.RepositoryBase
}
func NewCorpUserRepository ¶
func NewCorpUserRepository(ctx context.Context) *CorpUserRepository
func (*CorpUserRepository) GetCorpUserById ¶
func (this *CorpUserRepository) GetCorpUserById(id int) *CorpUser
func (*CorpUserRepository) GetCorpUserInCorp ¶
func (this *CorpUserRepository) GetCorpUserInCorp(id int, corp business.ICorp) *CorpUser
func (*CorpUserRepository) GetCorpUsers ¶
func (this *CorpUserRepository) GetCorpUsers(filters eel.Map) []*CorpUser
func (*CorpUserRepository) GetCorpUsersByIds ¶
func (this *CorpUserRepository) GetCorpUsersByIds(ids []int) []*CorpUser
func (*CorpUserRepository) GetPagedCorpUsers ¶
func (this *CorpUserRepository) GetPagedCorpUsers(filters eel.Map, page *eel.PageInfo) ([]*CorpUser, eel.INextPageInfo)
type CorpUserService ¶
type CorpUserService struct {
eel.ServiceBase
}
func NewCorpUserService ¶
func NewCorpUserService(ctx context.Context) *CorpUserService
type EncodeCorpService ¶
type EncodeCorpService struct {
eel.ServiceBase
}
func NewEncodeCorpService ¶
func NewEncodeCorpService(ctx context.Context) *EncodeCorpService
func (*EncodeCorpService) Encode ¶
func (this *EncodeCorpService) Encode(corp *Corp) *RCorp
func (*EncodeCorpService) EncodeMany ¶
func (this *EncodeCorpService) EncodeMany(corps []*Corp) []*RCorp
type EncodeCorpUserService ¶
type EncodeCorpUserService struct {
eel.ServiceBase
}
func NewEncodeCorpUserService ¶
func NewEncodeCorpUserService(ctx context.Context) *EncodeCorpUserService
func (*EncodeCorpUserService) Encode ¶
func (this *EncodeCorpUserService) Encode(corpUser *CorpUser) *RCorpUser
func (*EncodeCorpUserService) EncodeMany ¶
func (this *EncodeCorpUserService) EncodeMany(corpUsers []*CorpUser) []*RCorpUser
type FillCorpService ¶
type FillCorpService struct {
eel.ServiceBase
}
func NewFillCorpService ¶
func NewFillCorpService(ctx context.Context) *FillCorpService
func (*FillCorpService) Fill ¶
func (this *FillCorpService) Fill(corps []*Corp, option eel.FillOption)
func (*FillCorpService) FillOne ¶
func (this *FillCorpService) FillOne(corp *Corp, option eel.FillOption)
type FillCorpUserService ¶
type FillCorpUserService struct {
eel.ServiceBase
}
func NewFillCorpUserService ¶
func NewFillCorpUserService(ctx context.Context) *FillCorpUserService
func (*FillCorpUserService) Fill ¶
func (this *FillCorpUserService) Fill(users []*CorpUser, option eel.FillOption)
func (*FillCorpUserService) FillOne ¶
func (this *FillCorpUserService) FillOne(user *CorpUser, option eel.FillOption)
type RCorpUser ¶
type RCorpUser struct {
Id int `json:"id"`
CorpId int `json:"corp_id"`
CorpName string `json:"corp_name"`
Name string `json:"name"`
RealName string `json:"real_name"`
IsActive bool `json:"is_active"`
IsManager bool `json:"is_manager"`
Groups []*auth.RGroup `json:"groups"`
Permissions []*auth.RPermission `json:"permissions"`
}
Click to show internal directories.
Click to hide internal directories.