file

package
v0.0.0-...-e0e0b42 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigurerType spec.ConfigurerType = "FileConfigurer"

ConfigurerType is the kind of a Configurer that uses a normal file.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	// Dependencies.
	FileSystem afero.Fs
	Logger     micrologger.Logger

	// Settings.
	Path string
}

Config represents the configuration used to create a File Configurer.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides a default configuration to create a new File Configurer by best effort.

type FileConfigurer

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

FileConfigurer is an implementation of the Configurer interface, that uses a plain file to hold configuration.

func New

func New(config Config) (*FileConfigurer, error)

New creates a new configured File Configurer.

func (*FileConfigurer) Type

func (*FileConfigurer) Values

func (c *FileConfigurer) Values() (string, error)

Jump to

Keyboard shortcuts

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