seed: github.com/qlova/seed/template Index | Files

package template

import "github.com/qlova/seed/template"

Index

Package Files

template.go

type Ctx Uses

type Ctx struct {
    script.Seed
    // contains filtered or unexported fields
}

Ctx is a template script context.

func (Ctx) Data Uses

func (ctx Ctx) Data() script.Dynamic

Data returns a reference to the template's data.

func (Ctx) Refresh Uses

func (ctx Ctx) Refresh(data interface{})

Refresh refreshes the template with the provided data.

type Seed Uses

type Seed struct {
    seed.Seed
    // contains filtered or unexported fields
}

Seed is a template that can be duplicated and modified based on provided data.

func AddTo Uses

func AddTo(parent seed.Interface) Seed

AddTo parent.

func New Uses

func New() Seed

New returns a new template.

func (Seed) Ctx Uses

func (template Seed) Ctx(q script.Ctx) Ctx

Ctx returns the template's context.

func (Seed) OnRefresh Uses

func (template Seed) OnRefresh(f func(q script.Ctx, data script.Dynamic))

OnRefresh is called when the data of the template is refreshed.

Package template imports 4 packages (graph). Updated 2020-04-10. Refresh now. Tools for package owners.