Documentation
¶
Overview ¶
Package devctlpath calculates filesystem paths to devctl's configuration, cache and data.
Index ¶
- Constants
- func BinPath(elem ...string) string
- func CacheChartsFile(name string) string
- func CacheIndexFile(name string) string
- func CachePath(elem ...string) string
- func ConfigPath(elem ...string) string
- func DevCtlConfigFilePath() string
- func DevCtlConfigRoot(elem ...string) string
- func DownloadPath(elem ...string) string
- func PluginPath(elem ...string) string
- func SDKsPath(elem ...string) string
- type CachePathFinder
- type ConfigRootFinder
- type Option
- type Pather
- type UserHomePathFinder
Constants ¶
const ( ConfigHomeRootEnvVar = "DEVCTL_CONFIG_HOME" CacheHomeEnvVar = "DEVCTL_CACHE_HOME" )
Variables ¶
This section is empty.
Functions ¶
func CacheChartsFile ¶
CacheChartsFile returns the path to a text file listing all the charts within the given named repository.
func CacheIndexFile ¶
CacheIndexFile returns the path to an index for the given named repository.
func ConfigPath ¶
ConfigPath returns the path where Helm stores configuration.
func DevCtlConfigFilePath ¶
func DevCtlConfigFilePath() string
DevCtlConfigFilePath path where Helm stores configuration.
func DevCtlConfigRoot ¶
DevCtlConfigRoot the path where Helm stores configuration.
func DownloadPath ¶
DownloadPath returns the path where Helm stores configuration.
func PluginPath ¶
PluginPath returns the path where devctl plugins are located.
Types ¶
type CachePathFinder ¶
type CachePathFinder func() string
type ConfigRootFinder ¶
type ConfigRootFinder func() string
type Option ¶
type Option func(*lazypathFinder) *lazypathFinder
func WithAppPrefix ¶
func WithCachePathFn ¶
func WithCachePathFn(cacheFn CachePathFinder) Option
func WithConfigFile ¶
func WithConfigRootFn ¶
func WithConfigRootFn(cfgRootFn ConfigRootFinder) Option
func WithUserHomeFn ¶
func WithUserHomeFn(userHomeFn UserHomePathFinder) Option
type Pather ¶
type Pather interface {
// ConfigFilePath returns the path of the config.yaml used to configure the app itself
ConfigFilePath() string
// ConfigRoot returns the root path of the CLI configuration.
ConfigRoot(elem ...string) string
// Config returns a path to store configuration.
Config(elem ...string) string
// Bin returns a path to store executable binaries.
Bin(elem ...string) string
// Download returns the path where to save downloads
Download(elem ...string) string
// SDK returns the path where sdks are installed
SDK(elem ...string) string
// Cache returns the path where to cache files
Cache(elem ...string) string
// Plugin returns the path where to cache files
Plugin(elem ...string) string
}
Pather resolves different paths related to the CLI itself
func DefaultPather ¶
func DefaultPather() Pather
ConfigPath returns the path where Helm stores configuration.
type UserHomePathFinder ¶
type UserHomePathFinder func() string