loader

package
v1.19.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 264

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTag

func IsTag(name string) bool

Types

type Handler

type Handler func(item *TreeWalkItem) error

type OptionsBuilder added in v1.10.0

type OptionsBuilder interface {
	BuildOptions(options interface{}) error
}

type OptionsLoader

type OptionsLoader struct {
	Builders []OptionsBuilder
}

func NewOptionsLoader

func NewOptionsLoader(builders []OptionsBuilder) *OptionsLoader

func (*OptionsLoader) Build

func (l *OptionsLoader) Build(userConfig interface{}) (interface{}, error)

Build executes the options configuration templates, until they converge It bails out after maxIterations

type TreeWalkItem

type TreeWalkItem struct {
	Context      string
	Name         string
	Path         vfs.Path
	RelativePath string
	Meta         string
	Tags         []string
}

func (*TreeWalkItem) ReadBytes

func (i *TreeWalkItem) ReadBytes() ([]byte, error)

func (*TreeWalkItem) ReadString

func (i *TreeWalkItem) ReadString() (string, error)

type TreeWalker

type TreeWalker struct {
	Contexts       map[string]Handler
	Extensions     map[string]Handler
	DefaultHandler Handler
	Tags           sets.String
}

func (*TreeWalker) Walk

func (t *TreeWalker) Walk(basedir vfs.Path) error

Jump to

Keyboard shortcuts

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