provider

package
v1.4.14 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand added in v1.4.11

func Expand(s string, mapping func(string) string) string

Expand replaces ${var} or $var in the string based on the mapping function. For example, os.ExpandEnv(s) is equivalent to os.Expand(s, os.Getenv).

func Label added in v1.4.2

func Label(ctx context.Context) string

Label returns the label from the context, or zero value if not defined

func Logger added in v1.4.2

func Logger(ctx context.Context) server.Logger

Logger returns the logger from the context, or nil if not defined

func New added in v1.4.9

func New(plugins ...server.Plugin) (*pluginProvider, error)

func NewPlugin added in v1.4.9

func NewPlugin(v server.Plugin, path string) (*pluginMeta, error)

func NewProvider

func NewProvider(tasks ...server.Task) server.Provider

Create a new provider with tasks in the order they have been created.

func NewVariables added in v1.4.11

func NewVariables() *variables

func WithLabel added in v1.4.2

func WithLabel(ctx context.Context, label string) context.Context

WithLabel returns a context with the given label

func WithLogger added in v1.4.2

func WithLogger(ctx context.Context, logger server.Logger) context.Context

WithLogger returns a context with the given logger

Types

type Parser added in v1.4.11

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

func NewParser added in v1.4.11

func NewParser(plugins ...server.Plugin) (*Parser, error)

func (*Parser) Bind added in v1.4.11

func (p *Parser) Bind() error

Bind values

func (*Parser) ParseJSON added in v1.4.11

func (p *Parser) ParseJSON(r io.Reader) error

Append configurations from a JSON file

type PluginMeta added in v1.4.2

type PluginMeta struct {
	Name        string       `json:"name"`
	Description string       `json:"description"`
	Fields      []metafield  `json:"fields"`
	Type        reflect.Type `json:"-"`
	// contains filtered or unexported fields
}

func NewPluginMeta added in v1.4.9

func NewPluginMeta(v server.Plugin) (*PluginMeta, error)

NewPluginMeta returns metadata for a plugin

func (*PluginMeta) Get added in v1.4.2

func (m *PluginMeta) Get(v server.Plugin, label string) (any, error)

func (*PluginMeta) Set added in v1.4.2

func (m *PluginMeta) Set(v server.Plugin, label string, value any) error

func (*PluginMeta) String added in v1.4.11

func (m *PluginMeta) String() string

type ProviderContextKey added in v1.4.2

type ProviderContextKey int

Directories

Path Synopsis
implements a dependency graph algorithm
implements a dependency graph algorithm

Jump to

Keyboard shortcuts

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