config

package module
Version: v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicConfig

type BasicConfig struct {
	ConfigVersion float32
	LogLevel      logging.LogLevel
}

func (*BasicConfig) GetCurrentVersion

func (c *BasicConfig) GetCurrentVersion() float32

func (*BasicConfig) SetCurrentVersion

func (c *BasicConfig) SetCurrentVersion(v float32)

type ConfigManager

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

func NewConfigManager

func NewConfigManager(spec ConfigSpecifier, logger logging.Logger, sf StorageFormat) *ConfigManager

func (*ConfigManager) LoadConfig

func (me *ConfigManager) LoadConfig()

func (*ConfigManager) SaveConfig

func (me *ConfigManager) SaveConfig()

type ConfigSpecifier

type ConfigSpecifier interface {
	GetCurrentVersion() float32
	SetCurrentVersion(float32)
	GetVersionMatrix() []VersionSpec
}

type StorageFormat added in v0.1.2

type StorageFormat int
const (
	StorageFormatJSON StorageFormat = iota
	StorageFormatYAML StorageFormat = iota
)

type VersionSpec

type VersionSpec struct {
	VersionNumber float32
	Applyer       func()
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL