resolver

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceResolver

type NamespaceResolver interface {
	Resolve(key string) (string, error)
}

NamespaceResolver resolves keys within a namespace.

type Resolver

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

Resolver holds all namespace resolvers and resolves variable strings.

func New

func New(projectRoot string, secrets secret.Store) *Resolver

New creates a Resolver with all built-in namespace resolvers.

func NewWithResolvers

func NewWithResolvers(resolvers map[string]NamespaceResolver) *Resolver

NewWithResolvers creates a Resolver with the given namespace resolvers. Useful for testing with mock resolvers.

func (*Resolver) Resolve

func (r *Resolver) Resolve(s string) (string, error)

Resolve replaces all $(namespace.key) patterns in a string.

func (*Resolver) ResolveMap

func (r *Resolver) ResolveMap(m map[string]string) (map[string]string, error)

ResolveMap resolves all values in a map.

func (*Resolver) ResolveSlice

func (r *Resolver) ResolveSlice(ss []string) ([]string, error)

ResolveSlice resolves all strings in a slice.

Jump to

Keyboard shortcuts

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