Documentation ¶
Index ¶
- Constants
- func AllSettings() map[string]interface{}
- func AppendRecentEntry(value string) error
- func CacheDir() string
- func ConfigDir() string
- func ConfigFileUsed() string
- func EditorCommand() string
- func Get(key string) any
- func GetBool(key string) bool
- func GetInt(key string) int
- func GetString(key string) string
- func IsSet(key string) bool
- func NewConfig(cfgDir string) (*viper.Viper, error)
- func RecentEntries() []string
- func RegistryCachePath() string
- func RegistryDir() string
- func RegistryUrl() string
- func RemoveRecentEntry(value string) error
- func ServerPort() string
- func Set(key string, value any)
- func SetBool(key string, value bool)
- func SetBuildInfo(name string, info BuildInfo)
- func SetConfig(c *viper.Viper)
- func UpdateChannel() string
- func WriteConfig() error
- type BuildInfo
Constants ¶
View Source
const ( KeyRecent = "recent" KeyServerPort = "server_port" KeyEditorCommand = "editor_command" KeyUpdateChannel = "update_channel" KeyCacheDir = "templates_dir" KeyRegistryDir = "registry_dir" KeyRegistryUrl = "registry_url" KeyVersion = "version" KeyCommit = "commit" KeyDate = "date" KeyWindowHeight = "window_height" KeyWindowWidth = "window_width" )
Variables ¶
This section is empty.
Functions ¶
func AllSettings ¶
func AllSettings() map[string]interface{}
func AppendRecentEntry ¶
AppendRecentEntry appends a new entry to the list of recent entries entries are limited to 5 the most recent entry is at the beginning of the list stores the list in the config file
func ConfigFileUsed ¶
func ConfigFileUsed() string
func EditorCommand ¶
func EditorCommand() string
func RegistryCachePath ¶
func RegistryCachePath() string
func RegistryDir ¶
func RegistryDir() string
func RegistryUrl ¶
func RegistryUrl() string
func RemoveRecentEntry ¶
RemoveRecentEntry removes a recent entry from the list
func ServerPort ¶
func ServerPort() string
func SetBuildInfo ¶
func UpdateChannel ¶
func UpdateChannel() string
func WriteConfig ¶
func WriteConfig() error
Types ¶
type BuildInfo ¶ added in v0.35.0
type BuildInfo struct { Version string `yaml:"version"` Commit string `yaml:"commit"` Date string `yaml:"date"` }
BuildInfo contains information about the build it is stored under a key named "build" in the config file with the name (e.g. cli, studio) as sub-key
func GetBuildInfo ¶ added in v0.35.0
Click to show internal directories.
Click to hide internal directories.