Documentation ¶
Index ¶
- type FileDriver
- func (d *FileDriver) AddTemplate(ctx context.Context, key *templates.TemplateKey, template interface{}) error
- func (d *FileDriver) Close(ctx context.Context) error
- func (d *FileDriver) GetTemplate(ctx context.Context, key *templates.TemplateKey) (interface{}, error)
- func (d *FileDriver) Init(ctx context.Context) error
- func (d *FileDriver) ListTemplates(ctx context.Context, ch chan *templates.TemplateKey) error
- func (d *FileDriver) Prepare() error
- type TemplateFile
- type TemplateFileData
- type TemplateFileObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileDriver ¶
type FileDriver struct {
// contains filtered or unexported fields
}
func (*FileDriver) AddTemplate ¶
func (d *FileDriver) AddTemplate(ctx context.Context, key *templates.TemplateKey, template interface{}) error
func (*FileDriver) GetTemplate ¶
func (d *FileDriver) GetTemplate(ctx context.Context, key *templates.TemplateKey) (interface{}, error)
func (*FileDriver) ListTemplates ¶
func (d *FileDriver) ListTemplates(ctx context.Context, ch chan *templates.TemplateKey) error
func (*FileDriver) Prepare ¶
func (d *FileDriver) Prepare() error
type TemplateFile ¶
type TemplateFile struct {
Templates []*TemplateFileObject `json:"templates"`
}
func NewTemplateFile ¶
func NewTemplateFile() *TemplateFile
func (*TemplateFile) Add ¶
func (f *TemplateFile) Add(key *templates.TemplateKey, data interface{})
type TemplateFileData ¶
type TemplateFileData struct { Type string Data interface{} }
func (*TemplateFileData) UnmarshalJSON ¶
func (d *TemplateFileData) UnmarshalJSON(b []byte) error
type TemplateFileObject ¶
type TemplateFileObject struct { Key *templates.TemplateKey Data *TemplateFileData }
Click to show internal directories.
Click to hide internal directories.