Documentation ¶
Index ¶
- Constants
- Variables
- func SetTmplUser(user userModel.User)
- type AccountTmpl
- type Group
- func (t *Group) CreateAccount(user userModel.User, tmplAccount accountModel.Account, ctx context.Context) (account accountModel.Account, err error)
- func (t *Group) CreateAccountByTemplate(tmpl AccountTmpl, user userModel.User, ctx context.Context) (account accountModel.Account, accountUser accountModel.User, err error)
- func (t *Group) CreateCategory(account accountModel.Account, tmplAccount accountModel.Account, ...) error
- func (t *Group) CreateExampleAccount(user userModel.User, ctx context.Context) (account accountModel.Account, accountUser accountModel.User, err error)
- func (t *Group) GetList() ([]accountModel.Account, error)
- func (t *Group) GetListByRank(ctx context.Context) (result []accountModel.Account, err error)
- func (t *Group) NewAccountTmpl() AccountTmpl
Constants ¶
View Source
const ( TmplUserEmail = "template@gmail.com" TmplUserName = "template" )
Variables ¶
View Source
var ErrNotBelongTemplate = errors.New("不属于模板")
View Source
var (
GroupApp = &Group{}
)
View Source
var TemplateApp = &template{}
View Source
var TmplUserId uint = 1
View Source
var TmplUserPassword = rand.String(15)
Functions ¶
func SetTmplUser ¶
Types ¶
type AccountTmpl ¶
type AccountTmpl struct {
Name, Icon, Location string
Type accountModel.Type
Category []fatherTmpl
}
func (*AccountTmpl) ReadFromJson ¶
func (at *AccountTmpl) ReadFromJson(path string) error
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) CreateAccount ¶
func (t *Group) CreateAccount( user userModel.User, tmplAccount accountModel.Account, ctx context.Context, ) (account accountModel.Account, err error)
func (*Group) CreateAccountByTemplate ¶
func (t *Group) CreateAccountByTemplate( tmpl AccountTmpl, user userModel.User, ctx context.Context, ) (account accountModel.Account, accountUser accountModel.User, err error)
func (*Group) CreateCategory ¶
func (t *Group) CreateCategory( account accountModel.Account, tmplAccount accountModel.Account, ctx context.Context, ) error
func (*Group) CreateExampleAccount ¶
func (t *Group) CreateExampleAccount(user userModel.User, ctx context.Context) ( account accountModel.Account, accountUser accountModel.User, err error, )
func (*Group) GetList ¶
func (t *Group) GetList() ([]accountModel.Account, error)
func (*Group) GetListByRank ¶
func (t *Group) GetListByRank(ctx context.Context) (result []accountModel.Account, err error)
func (*Group) NewAccountTmpl ¶
func (t *Group) NewAccountTmpl() AccountTmpl
Click to show internal directories.
Click to hide internal directories.