Documentation ¶
Index ¶
- func CueLoader(c *Config) (err error)
- func DefaultConfigStore(env string) (store *config.FileStore, err error)
- func DetermineRoot(params DetermineRootParams) (found string, err error)
- func DetermineRootFromCWD(searchSuffix string) (string, error)
- func DetermineRootFromGitExec() (string, error)
- func DetermineRootWithFallback(params DetermineRootParams) (string, error)
- func IsNoRootFound(err error) bool
- func JSONLoader(c *Config) error
- func NewEnvScopedFileStore(ctx context.Context, ws *Config, env string) (*config.FileStore, error)
- func NewFileStore(ctx context.Context, ws *Config) (*config.FileStore, error)
- func StorePathWithEnv(ws *Config, env string) string
- func StoreRoot(ws *Config) string
- type CodeGenSettings
- type Config
- type ConfigStoreSettings
- type DetermineRootParams
- type FileSystemSettings
- type LoadConfigParams
- type RemoteCacheSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineRoot ¶
func DetermineRoot(params DetermineRootParams) (found string, err error)
DetermineRoot recursively searches the current directory and all its parents for DetermineRootParams.SearchSuffix
func DetermineRootFromCWD ¶
DetermineRootFromCWD determine the workspace root from the current working directory
func DetermineRootWithFallback ¶
func DetermineRootWithFallback(params DetermineRootParams) (string, error)
func IsNoRootFound ¶
func JSONLoader ¶
func NewEnvScopedFileStore ¶
func StorePathWithEnv ¶
Types ¶
type CodeGenSettings ¶
type CodeGenSettings struct {
OutputDir string `json:"output_dir"`
}
type Config ¶
type Config struct { ConfigStore ConfigStoreSettings `json:"config_store"` FileSystem FileSystemSettings `json:"file_system"` RemoteCache RemoteCacheSettings `json:"remote_cache"` CodeGen CodeGenSettings `json:"code_gen"` VersionCheckDisabled bool `json:"version_check_disabled"` // contains filtered or unexported fields }
Config holds data for configuring a workspace
func LoadConfig ¶
func LoadConfig(params LoadConfigParams) (c *Config, err error)
LoadConfig reads the bytes out of json settings and unmarshalls them into a Config object
func LoadConfigFromCWD ¶
func LoadConfigFromCWD(params LoadConfigParams) (*Config, error)
LoadConfigFromCWD reads the bytes out of json settings and unmarshalls them into a Config object from the CWD
func NewWorkspaceConfig ¶
func (Config) ConfigRoot ¶
type ConfigStoreSettings ¶
type ConfigStoreSettings struct {
EncryptionKeys []config.EncryptionKey `json:"encryption_keys"`
}
ConfigStoreSettings allows user to set Vault address that's not reliant on an env var
func (ConfigStoreSettings) KeyByEnv ¶
func (s ConfigStoreSettings) KeyByEnv(env string) (config.EncryptionKey, error)
type DetermineRootParams ¶
type FileSystemSettings ¶
type FileSystemSettings struct {
Ignore []string
}
FileSystemSettings configures the workspace file system observer
type LoadConfigParams ¶
type LoadConfigParams struct { DetermineRootParams LoaderFunc func(*Config) error }
type RemoteCacheSettings ¶
type RemoteCacheSettings struct {
URL string
}
RemoteCacheSettings configures the workspace remote cache location