config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const StrategyDry = "DRYRUN"
View Source
const StrategyHook = "HOOK"
View Source
const StrategyOnce = "ONCE"
View Source
const StrategyPoll = "POLL"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFlags

type ConfigFlags struct {
	LogLevel        *string
	Strategy        *string
	RepoURL         *string
	RepoSSHKey      *string
	RepoSSHUser     *string
	RepoBranch      *string
	RepoRemoteName  *string
	RepoBasePath    *string
	RepoRootDir     *string
	ConsulURL       *string
	ConsulACL       *string
	ConsulBasePath  *string
	ExpandJSON      *bool
	ExpandYAML      *bool
	SecretsFile     *string
	AllowDeletes    *string
	PollInterval    *int
	ValidExtensions *string
	KeepFileExt     *bool
	Timeout         *int
	Version         *bool
}

type IConfig

type IConfig interface {
	IsCloning() bool
	GetLogLevel() int
	GetStrategy() string
	GetRepoURL() string
	GetRepoSSHKey() string
	GetRepoSSHUser() string
	GetRepoBranch() string
	GetRepoRemoteName() string
	GetRepoBasePath() string
	GetRepoRootDir() string
	GetConsulURL() string
	GetConsulACL() string
	GetConsulBasePath() string
	ShouldExpandJSON() bool
	ShouldExpandYAML() bool
	DoSecrets() bool
	GetSecretsMap() map[string]string
	AllowDeletes() string
	GetPollInterval() int
	WorkingChan() chan bool
	GetValidExtensions() []string
	KeepFileExt() bool
	GetTimeout() int
	IsShowVersion() bool
}

IConfig is our config interface, implemented by our config struct above. It allows us to pass along an interface so we can mock and test any function that receives it

func NewConfig

func NewConfig() (IConfig, error)

NewConfig is our config struct constructor.

Jump to

Keyboard shortcuts

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