devctlpath

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package devctlpath calculates filesystem paths to devctl's configuration, cache and data.

Index

Constants

View Source
const (
	ConfigHomeRootEnvVar = "DEVCTL_CONFIG_HOME"
	CacheHomeEnvVar      = "DEVCTL_CACHE_HOME"
)

Variables

This section is empty.

Functions

func BinPath

func BinPath(elem ...string) string

BinPath returns the path where Helm stores configuration.

func CacheChartsFile

func CacheChartsFile(name string) string

CacheChartsFile returns the path to a text file listing all the charts within the given named repository.

func CacheIndexFile

func CacheIndexFile(name string) string

CacheIndexFile returns the path to an index for the given named repository.

func CachePath

func CachePath(elem ...string) string

CachePath returns the path where Helm stores cached objects.

func ConfigPath

func ConfigPath(elem ...string) string

ConfigPath returns the path where Helm stores configuration.

func DevCtlConfigFilePath

func DevCtlConfigFilePath() string

DevCtlConfigFilePath path where Helm stores configuration.

func DevCtlConfigRoot

func DevCtlConfigRoot(elem ...string) string

DevCtlConfigRoot the path where Helm stores configuration.

func DownloadPath

func DownloadPath(elem ...string) string

DownloadPath returns the path where Helm stores configuration.

func SDKsPath

func SDKsPath(elem ...string) string

SDKsPath returns the path where Helm stores configuration.

Types

type CachePathFinder

type CachePathFinder func() string

type ConfigRootFinder

type ConfigRootFinder func() string

type Option

type Option func(*lazypathFinder) *lazypathFinder

func WithAppPrefix

func WithAppPrefix(prefix string) Option

func WithCachePathFn

func WithCachePathFn(cacheFn CachePathFinder) Option

func WithConfigFile

func WithConfigFile(cfgName string) Option

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
}

Pather resolves different paths related to the CLI itself

func DefaultPather

func DefaultPather() Pather

ConfigPath returns the path where Helm stores configuration.

func NewPather

func NewPather(opts ...Option) Pather

NewPather creates and configures a Pather using the default Option's and then applies provided opts Option's

type UserHomePathFinder

type UserHomePathFinder func() string

Directories

Path Synopsis
Package xdg holds constants pertaining to XDG Base Directory Specification.
Package xdg holds constants pertaining to XDG Base Directory Specification.

Jump to

Keyboard shortcuts

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