template

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	ExecuteWithContext(ctx context.Context, t Preparer, wr io.Writer, data any) error
}

type Fs

type Fs interface {
	WalkLayouts(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
}

type Identity

type Identity interface {
	IdentifierBase() string
}

type Info

type Info interface {
	ParseInfo() ParseInfo
}

type Lookup

type Lookup interface {
	LookupLayout(names []string) (Preparer, bool, error)
	GetFunc(name string) (reflect.Value, bool)
}

type ParseInfo

type ParseInfo interface {
	Return() bool
	Inner() bool
}

type Preparer

type Preparer interface {
	Name() string
	template.Preparer
}

type Service

type Service interface {
	Execute(ctx context.Context, name string, data any) (tmpl string, res string, err error)
}

type Template

type Template interface {
	Executor
	Lookup
}

type Type

type Type int
const (
	TypeUndefined Type = iota
	TypeShortcode
	TypePartial
)

type Variants

type Variants struct {
	Language     string
	OutputFormat output.Format
}

Variants describes the possible variants of a template. All of these may be empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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