config

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileConfig

func GetFileConfig(p *project.Project, fileName string) ([]byte, error)

GetFileConfig - Returns a configuration from a flag. Looks for .json/.yml/.yaml formats

func GetFlagConfig

func GetFlagConfig(p *project.Project, flag string) ([]byte, error)

GetFlagConfig - Returns a configuration from a flag.

func LoadConfig

func LoadConfig(p *project.Project, flag string, fileName string) ([]byte, error)

LoadConfig - loads a specific shore config such as render.yml or exec.yml. Tries from flag first, then from filesystem.

func ReadConfigFile

func ReadConfigFile(p *project.Project, filePath string) ([]byte, error)

ReadConfigFile - Reads in a config. Supports json/yaml/yml

func SetupTest

func SetupTest(t *testing.T, f func(*testing.T, *project.Project))

SetupTest is a general purpose set up for the config tests.

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

type ProfileMetaData struct {
	Application string
	Pipeline    string
}

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.

Jump to

Keyboard shortcuts

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