file

package
v0.0.0-...-c349b99 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Defaults is a function that applies a default namespace and domain to new ConfigRef instances
	Defaults = WithDefaults(defaultNamespace, defaultDomain)
)

Functions

func WithDefaults

func WithDefaults(namespace, domain string) func(*ConfigRef) *ConfigRef

WithDefaults applies the provided namespace and domain to ConfigRef instances.

Types

type ConfigRef

type ConfigRef struct {
	Meta     *model.ConfigMeta
	FilePath string
}

ConfigRef provides information for a single element of configuration stored in a file.

type ConfigStore

type ConfigStore interface {
	model.ConfigStore

	// CreateFromFile create a new configuration element from the specified file.
	CreateFromFile(config ConfigRef) error
}

ConfigStore is a decorator around another config store that adds support for loading configuration elements from files.

func NewConfigStore

func NewConfigStore(store model.ConfigStore) ConfigStore

NewConfigStore creates a new file-based config store.

Jump to

Keyboard shortcuts

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