Documentation
¶
Index ¶
- type BeforeWrite
- type Cache
- type CacheRepository
- func (r CacheRepository) DeleteByID(ctx context.Context, id uuid.UUID) error
- func (r CacheRepository) FindByCode(ctx context.Context, code string, date time.Time) (template *Template, err error)
- func (r CacheRepository) FindByID(ctx context.Context, id uuid.UUID) (template *Template, err error)
- func (r CacheRepository) Save(ctx context.Context, template *Template) error
- type ChainLoader
- type Environment
- func (t *Environment) Debug(debug bool) Theme
- func (t *Environment) Funcs(funcMap template.FuncMap) Theme
- func (t *Environment) Global(global ...string) Theme
- func (t *Environment) HTML(ctx context.Context, name string, data interface{}) (string, error)
- func (t *Environment) Write(ctx context.Context, w io.Writer, name string, data interface{}) error
- type FilesystemLoader
- type FuncMap
- type Handler
- type Loader
- type MemoryLoader
- type Repository
- type Source
- type Template
- type TemplateLoader
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeforeWrite ¶
type CacheRepository ¶
type CacheRepository struct { Repository Cache Cache }
func (CacheRepository) DeleteByID ¶
func (CacheRepository) FindByCode ¶
type ChainLoader ¶
type ChainLoader = et.ChainLoader
type Environment ¶
type Environment struct { *et.Environment // contains filtered or unexported fields }
func New ¶
func New(loader Loader, beforeWrite BeforeWrite, handlers ...Handler) *Environment
func (*Environment) Debug ¶
func (t *Environment) Debug(debug bool) Theme
func (*Environment) Global ¶
func (t *Environment) Global(global ...string) Theme
type FilesystemLoader ¶
type FilesystemLoader = et.FilesystemLoader
type MemoryLoader ¶
type MemoryLoader = et.MemoryLoader
type Repository ¶
type Repository interface { Find(ctx context.Context, criteria *cr.Criteria) ([]*Template, int, error) FindByID(ctx context.Context, id uuid.UUID) (*Template, error) FindByCode(ctx context.Context, code string, date time.Time) (*Template, error) DeleteByID(ctx context.Context, id uuid.UUID) error Save(ctx context.Context, template *Template) error }
type Template ¶
type Template struct { ID uuid.UUID `cfg:"id,omitempty" json:"id,omitempty" yaml:"id,omitempty" bson:"id,omitempty"` Code string `cfg:"code,omitempty" json:"code,omitempty" yaml:"code,omitempty" bson:"code,omitempty"` Content string `cfg:"content,omitempty" json:"content,omitempty" yaml:"content,omitempty" bson:"content,omitempty"` Created time.Time `cfg:"created,omitempty" json:"created,omitempty" yaml:"created,omitempty" bson:"created,omitempty"` Updated time.Time `cfg:"updated,omitempty" json:"updated,omitempty" yaml:"updated,omitempty" bson:"updated,omitempty"` Published *time.Time `cfg:"published,omitempty" json:"published,omitempty" yaml:"published,omitempty" bson:"published,omitempty"` Expired *time.Time `cfg:"expired,omitempty" json:"expired,omitempty" yaml:"expired,omitempty" bson:"expired,omitempty"` }
func (*Template) ContentBytes ¶
type TemplateLoader ¶
type TemplateLoader struct {
Repository Repository
}
Click to show internal directories.
Click to hide internal directories.