Documentation ¶
Index ¶
- func GetFileConfig(p *project.Project, fileName string) ([]byte, error)
- func GetFlagConfig(p *project.Project, flag string) ([]byte, error)
- func LoadConfig(p *project.Project, flag string, fileName string) ([]byte, error)
- func ReadConfigFile(p *project.Project, filePath string) ([]byte, error)
- func SetupTest(t *testing.T, f func(*testing.T, *project.Project))
- type ConfigurationErr
- type FileConfErr
- type FlagConfigErr
- type ProfileMetaData
- type ShoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileConfig ¶
GetFileConfig - Returns a configuration from a flag. Looks for .json/.yml/.yaml formats
func GetFlagConfig ¶
GetFlagConfig - Returns a configuration from a flag.
func LoadConfig ¶
LoadConfig - loads a specific shore config such as render.yml or exec.yml. Tries from flag first, then from filesystem.
func ReadConfigFile ¶
ReadConfigFile - Reads in a config. Supports json/yaml/yml
Types ¶
type ConfigurationErr ¶
type ConfigurationErr struct {
Err error
}
ConfigurationErr is thrown when a general configuration error happens.
func (*ConfigurationErr) Error ¶
func (c *ConfigurationErr) Error() string
type FileConfErr ¶
type FileConfErr struct {
Err error
}
FileConfErr - an error that occurs when there's an issue with the configuration files.
func (*FileConfErr) Error ¶
func (c *FileConfErr) Error() string
type FlagConfigErr ¶
type FlagConfigErr struct {
Err error
}
FlagConfigErr is an error that occurs when there's an issue with the configuration flags.
func (*FlagConfigErr) Error ¶
func (c *FlagConfigErr) Error() string
type ProfileMetaData ¶
ProfileMetaData - Metadata for a given profile.
type ShoreConfig ¶
type ShoreConfig struct { Renderer map[string]interface{} `json:"renderer"` Executor map[string]interface{} `json:"executor"` Profiles map[string]interface{} `json:"profiles"` }
ShoreConfig - A structure representing the Shore Config.
func LoadShoreConfig ¶
func LoadShoreConfig(p *project.Project) (ShoreConfig, error)
LoadShoreConfig - Loads the Shore Config given a Project obj.