tmpl

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyFunc added in v0.1.1

func KeyFunc(a Action, s State) func(string) string

func KeyOrDefaultFunc added in v0.1.1

func KeyOrDefaultFunc(a Action, s State) func(string, string) string

func TemplateFuncMap added in v0.1.1

func TemplateFuncMap(a Action, s State) template.FuncMap

func TreeFunc added in v0.1.1

func TreeFunc(a Action, s State) func(string) []TreeModel

Types

type Action added in v0.1.1

type Action interface {
	Query(key string)
	Keys() cachekeys.MapGetter
}

type Item

type Item struct {
	// contains filtered or unexported fields
}

func NewItem

func NewItem(in, out string, a Action) (*Item, error)

func (*Item) IsChanged added in v0.1.1

func (v *Item) IsChanged() bool

func (*Item) IsPrepared added in v0.1.1

func (v *Item) IsPrepared() bool

func (*Item) Prepare added in v0.1.1

func (v *Item) Prepare() error

func (*Item) Update

func (v *Item) Update() error

type State added in v0.1.1

type State interface {
	IsPrepared() bool
}

type Tmpl

type Tmpl struct {
	// contains filtered or unexported fields
}

func New

func New(l xlog.Logger) *Tmpl

func (*Tmpl) Add

func (v *Tmpl) Add(in, out string) (err error)

func (*Tmpl) Keys added in v0.1.1

func (v *Tmpl) Keys() cachekeys.MapGetter

func (*Tmpl) KeysHandler

func (v *Tmpl) KeysHandler(call func(key string))

func (*Tmpl) Query added in v0.1.1

func (v *Tmpl) Query(key string)

func (*Tmpl) SetKey

func (v *Tmpl) SetKey(key string, value *string)

func (*Tmpl) Watch

func (v *Tmpl) Watch(ctx xc.Context, interval time.Duration)

type TreeModel added in v0.1.1

type TreeModel struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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