Documentation ¶
Index ¶
- func DecodeYAMLLibObject(yamlData interface{}) interface{}
- func ExitFatal(a ...interface{})
- func ExitFatalf(format string, a ...interface{})
- func GetByJSONPointer(inData interface{}, key string) (interface{}, error)
- func GetContent(url string) ([]byte, error)
- func GetEnvMap() map[string]string
- func GetSortedKeys(object map[string]interface{}) []string
- func LoadFile(filePath string) (map[string]interface{}, error)
- func LoadTemplate(filePath string, params interface{}) (map[string]interface{}, error)
- func MatchAsJSON(expected interface{}) types.GomegaMatcher
- func PublicKeyFile(file string) ssh.AuthMethod
- func SaveFile(file string, data interface{}) error
- func TempFile(dir string, prefix string, suffix string) (*os.File, error)
- type Config
- func (config *Config) GetBool(key string, defaultValue bool) bool
- func (config *Config) GetList(key string, defaultValue []interface{}) []interface{}
- func (config *Config) GetParam(key string, defaultValue interface{}) interface{}
- func (config *Config) GetString(key, defaultValue string) string
- func (config *Config) GetStringList(key string, defaultValue []string) []string
- func (config *Config) ReadConfig(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeYAMLLibObject ¶
func DecodeYAMLLibObject(yamlData interface{}) interface{}
DecodeYAMLLibObject decodes interface format yaml.v2 lib returns map as map[interface{}]interface{} while gohan lib uses map[string]interface{} so we need to convert it here
func GetByJSONPointer ¶
GetByJSONPointer returns subdata of json using json pointer
func GetContent ¶
GetContent loads file from remote or local
func GetSortedKeys ¶
GetSortedKeys returns sorted keys of map[string]interface{}
func LoadFile ¶
LoadFile loads object from file. suffix of filepath will be used as file type. currently, json and yaml is supported
func LoadTemplate ¶
LoadTemplate loads object from file. suffix of filepath will be used as file type. currently, json and yaml is supported
func MatchAsJSON ¶
func MatchAsJSON(expected interface{}) types.GomegaMatcher
MatchAsJSON checks whether the provided arguments are equivalent after being marshalled as JSONs
func PublicKeyFile ¶
func PublicKeyFile(file string) ssh.AuthMethod
PublicKeyFile read file and return ssh public keys
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config stores configuration paramters for api server
func (*Config) GetStringList ¶
GetStringList returns string list parameter from config
func (*Config) ReadConfig ¶
ReadConfig reads data from config file Config file can be yaml or json file