templateService

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

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

func SetTmplUser(user userModel.User)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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