Documentation ¶
Index ¶
- Constants
- type Adapter
- type AdapterDefault
- type AdapterFile
- type Config
- type View
- func (view *View) Assigns(data gview.Params)
- func (view *View) GetAdapter() Adapter
- func (view *View) Parse(ctx context.Context, key string, params ...gview.Params) (string, error)
- func (view *View) SetAdapter(adapter Adapter) *View
- func (view *View) SetAutoEncode(enable bool)
- func (view *View) SetConfig(config Config) *View
- func (view *View) SetConfigWithMap(m map[string]interface{}) error
- func (view *View) SetDelimiters(left, right string)
- func (view *View) SetI18n(manager *gi18n.Manager)
Constants ¶
View Source
const ConfigNodeNameViewer = "viewer"
View Source
const (
DefaultTemplatePath = "template"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterDefault ¶ added in v0.4.2
type AdapterDefault struct {
// contains filtered or unexported fields
}
func NewAdapterDefault ¶ added in v0.4.2
func NewAdapterDefault(adapter Adapter, fallbacks ...Adapter) *AdapterDefault
func (*AdapterDefault) GetContent ¶ added in v0.4.2
func (a *AdapterDefault) GetContent(key string) (content string, err error)
type AdapterFile ¶
type AdapterFile struct {
// contains filtered or unexported fields
}
func NewAdapterFile ¶
func NewAdapterFile(templatePath ...string) *AdapterFile
func (*AdapterFile) GetContent ¶
func (a *AdapterFile) GetContent(key string) (content string, err error)
type View ¶
type View struct {
// contains filtered or unexported fields
}
func NewWithAdapter ¶
func (*View) GetAdapter ¶
func (*View) SetAdapter ¶
func (*View) SetAutoEncode ¶
func (*View) SetConfigWithMap ¶
func (*View) SetDelimiters ¶
Click to show internal directories.
Click to hide internal directories.