Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NamespaceSeperator = "."
NamespaceSeperator seperates templates in different directories
Functions ¶
This section is empty.
Types ¶
type ErrTemplateDefined ¶
type ErrTemplateDefined struct {
Name string
}
A ErrTemplateDefined is returned when a template of the same name already exists in the Store
func (ErrTemplateDefined) Error ¶
func (e ErrTemplateDefined) Error() string
Error implements the error interface
type ErrTemplateNotFound ¶
type ErrTemplateNotFound struct {
Name string
}
A ErrTemplateNotFound is returned when a template is not found be Parse
func (ErrTemplateNotFound) Error ¶
func (e ErrTemplateNotFound) Error() string
Error implements the error interface
type SourceFunc ¶
The SourceFunc is an adapter allowing regular functions to act as Sourcers
func (SourceFunc) Source ¶
func (fn SourceFunc) Source(store *Store) error
Source implements the Sourcer interface calling the wrapped function
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
A Store stores parsed SQL templates that can be executed by their name
func (*Store) Add ¶
Add adds a template to the store, if a template already exists an ErrTemplateDefined will be returned
Click to show internal directories.
Click to hide internal directories.