Documentation ¶
Index ¶
- Constants
- Variables
- func GetContextsPath() string
- func GetCurrentVersion(url string) string
- func GetHomeDir() string
- func GetLatestVersion(url string) string
- func GetVersion(versionType string) string
- func Init() error
- func LoadConfiguration(c *cli.Context) error
- func WriteConfigValueToConfigFile(key, value string) error
- func WriteYamlFile(filename string, values *ContextMap) error
- type ContextFile
- type ContextMap
Constants ¶
View Source
const ( DefaultProvider = "default" ReadWritePerms = os.FileMode(0755) CurrentContext = "current-context" ContextProvider = "provider" CurrentCliVersion = "cli-version" EnvFnRegistry = "registry" EnvFnContext = "context" )
Variables ¶
View Source
var DefaultContextConfigContents = &ContextMap{ ContextProvider: DefaultProvider, provider.CfgFnAPIURL: defaultLocalAPIURL, EnvFnRegistry: "", }
View Source
var Version = "0.5.29"
Version of Fn CLI
Functions ¶
func GetContextsPath ¶
func GetContextsPath() string
GetContextsPath : Returns the path to the contexts directory.
func GetCurrentVersion ¶
func GetHomeDir ¶
func GetHomeDir() string
func GetLatestVersion ¶
func GetVersion ¶
func LoadConfiguration ¶
func WriteYamlFile ¶
func WriteYamlFile(filename string, values *ContextMap) error
Types ¶
type ContextFile ¶
type ContextFile struct { ContextProvider string `yaml:"provider" json:"provider"` EnvFnAPIURL string `yaml:"api-url" json:"apiUrl"` EnvFnRegistry string `yaml:"registry" json:"registry"` }
ContextFile defines the internal structure of a default context
func NewContextFile ¶
func NewContextFile(filePath string) (*ContextFile, error)
NewContextFile creates a new instance of the context YAML file
type ContextMap ¶
func DecodeYAMLFile ¶
func DecodeYAMLFile(filename string) (*ContextMap, error)
Click to show internal directories.
Click to hide internal directories.