package config
import "github.com/oslokommune/okctl/pkg/config"
Package config interacts with all configuration state
Index ¶
- func NoopDataLoader(_ *Config) error
- func SkipUnlessIntegration(t *testing.T)
- type Config
- func New() *Config
- func (c *Config) EnableFileLog() error
- func (c *Config) GetFullLogFilePath(logFileName string) (string, error)
- func (c *Config) GetHomeDir() (string, error)
- func (c *Config) GetRepoApplicationsOutputDir() (string, error)
- func (c *Config) GetRepoDir() (string, error)
- func (c *Config) GetRepoOutputDir() (string, error)
- func (c *Config) GetRepoStateDir() (string, error)
- func (c *Config) GetRepoStatePath() (string, error)
- func (c *Config) GetUserDataDir() (string, error)
- func (c *Config) GetUserDataPath() (string, error)
- func (c *Config) LoadRepoData() error
- func (c *Config) LoadUserData() error
- func (c *Config) WriteCurrentUserData() error
- type DataLoaderFn
Functions ¶
func NoopDataLoader ¶
NoopDataLoader does nothing
func SkipUnlessIntegration ¶
SkipUnlessIntegration skips a test when not running in a CI environment
Types ¶
type Config ¶
type Config struct { *context.Context UserDataLoader DataLoaderFn UserState *state.User RepoDataLoader DataLoaderFn Declaration *v1alpha1.Cluster Destination string ServerURL string ServerBaseURL string // contains filtered or unexported fields }
Config stores state for representing and interacting with okctl state
func New ¶
func New() *Config
New Config initialises a default okctl configuration
func (*Config) EnableFileLog ¶
EnableFileLog for writing logs to a file
func (*Config) GetFullLogFilePath ¶
GetFullLogFilePath returns the full path to a logfile
func (*Config) GetHomeDir ¶
GetHomeDir will return the value of OKCTL_HOME. Will default to the user's home directory. I.e.: /home/user/ in unix based systems
func (*Config) GetRepoApplicationsOutputDir ¶
GetRepoApplicationsOutputDir returns the directory where application resources are stored
func (*Config) GetRepoDir ¶
GetRepoDir will return the currently active repository directory
func (*Config) GetRepoOutputDir ¶
GetRepoOutputDir return the repository output directory, where cloud formation stacks, etc., should be written
func (*Config) GetRepoStateDir ¶
GetRepoStateDir will return the directory where repo data should be read/written
func (*Config) GetRepoStatePath ¶
GetRepoStatePath will return the filename where repo data should be read/written
func (*Config) GetUserDataDir ¶
GetUserDataDir will get the directory to where okctl application data should be written. I.e.: /home/user/.okctl in unix based systems
func (*Config) GetUserDataPath ¶
GetUserDataPath returns the path to the okctl application config path. I.e.: /home/user/.okctl/conf.yml
func (*Config) LoadRepoData ¶
LoadRepoData will attempt to load repository data
func (*Config) LoadUserData ¶
LoadUserData will attempt to load okctl application data
func (*Config) WriteCurrentUserData ¶
WriteCurrentUserData writes the current app data state to disk
type DataLoaderFn ¶
DataLoaderFn is the type for loading configuration data
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
pkg/config/constant | Package constant contains constants used throughout okctl |
pkg/config/load | Package load knows how to load application and repository data |
pkg/config/state | Package state holds the config state |
- Version
- v0.0.106 (latest)
- Published
- Oct 21, 2022
- Platform
- linux/amd64
- Imports
- 16 packages
- Last checked
- 10 hours ago –
Tools for package owners.