v1alpha

package
v0.0.18-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigStore

type ConfigStore interface {
	HasItem(namespace, key string) bool
	SetItem(namespace, key string, value interface{}) error
	GetItem(namespace, key string) (interface{}, error)

	GetString(namespace, key string) string
	GetStringSlice(namespace, key string) []string
	GetStringMap(namespace, key string) map[string]string

	GetBool(namespace, key string) bool
	GetInt(namespace, key string) int
	GetFloat(namespace, key string) float64

	Load(r io.Reader, format ConfigStoreFormat) error
	Save(w io.Writer, format ConfigStoreFormat) error
}

ConfigStore is a generic interface for a configuration store

type ConfigStoreFormat

type ConfigStoreFormat int

ConfigStoreFormat specifies a configuration store format

const (

	// YAMLFormat indicates a yaml configuration file
	YAMLFormat ConfigStoreFormat
)

func ParseConfigStoreFormat

func ParseConfigStoreFormat(name string) (ConfigStoreFormat, error)

ParseConfigStoreFormat attempts to convert a string to a ConfigStoreFormat

func (ConfigStoreFormat) MarshalText

func (f ConfigStoreFormat) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (ConfigStoreFormat) String

func (f ConfigStoreFormat) String() string

String implements the Stringer interface.

func (*ConfigStoreFormat) UnmarshalText

func (f *ConfigStoreFormat) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

type ConfigStoreProvider

type ConfigStoreProvider interface {
	Initialize(options ...ConfigStoreProviderOption) error
	ConfigStore() ConfigStore
}

ConfigStoreProvider is a generic interface that provides a ConfigStore

type ConfigStoreProviderOption

type ConfigStoreProviderOption interface {
	Apply(ConfigStoreProviderOption) error
}

ConfigStoreProviderOption is a option for a BuildRequestProvider

Jump to

Keyboard shortcuts

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