Documentation ¶
Index ¶
- func GetFs() afero.Fs
- func IsMemMapFs(f afero.Fs) bool
- func IsOsFs(f afero.Fs) bool
- func Realpath(path string) (string, error)
- func SetFs(_fs afero.Fs)
- type Factory
- type FactoryConfig
- type FactoryOption
- type Paths
- func (p Paths) Base() string
- func (p Paths) BinPath() string
- func (p Paths) IndexBase() string
- func (p Paths) IndexPath(name string) string
- func (p Paths) IndexPluginManifestPath(indexName, pluginName string) string
- func (p Paths) IndexPluginsPath(name string) string
- func (p Paths) InstallPath() string
- func (p Paths) InstallReceiptsPath() string
- func (p Paths) PluginInstallPath(plugin string) string
- func (p Paths) PluginInstallReceiptPath(plugin string) string
- func (p Paths) PluginVersionInstallPath(plugin, version string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMemMapFs ¶
IsMemMapFs returns true if the afero.Fs is of type *afero.MemMapFs
Types ¶
type Factory ¶
type Factory interface { RuntimeInfo() system.RuntimeInfo // NewBuilder returns an object that assists in loading objects from both disk and the server // and which implements the common patterns for CLI interactions with generic resources. NewBuilder() *util.Builder Logger() log.Logger Pather() devctlpath.Pather Paths() Paths Fs() afero.Fs Streams() options.IOStreams // Returns a schema that can validate objects stored on disk. Validator(validate bool) (validation.Schema, error) }
Factory provides abstractions that allow the Devctl command to be extended across multiple types of resources and different API sets.
func NewFactory ¶
func NewFactory(opts ...FactoryOption) Factory
type FactoryConfig ¶
type FactoryOption ¶
type FactoryOption func(*FactoryConfig) *FactoryConfig
type Paths ¶
type Paths struct {
// contains filtered or unexported fields
}
func MustGetPaths ¶
func MustGetPaths() Paths
MustGetPaths returns the inferred paths for devctl. By default, it assumes $HOME/.devctl as the base path, but can be overridden via DEVCTL_ROOT environment variable.
func (Paths) BinPath ¶
BinPath returns the path where plugin executable symbolic links are found. This path should be added to $PATH in client machine.
e.g. {BasePath}/bin
func (Paths) IndexPath ¶
IndexPath returns the directory where a plugin index repository is cloned.
e.g. {BasePath}/index/default or {BasePath}/index
func (Paths) IndexPluginManifestPath ¶
IndexPluginManifestPath returns the plugins directory of an index repository.
e.g. {BasePath}/index/default/plugins/ or {BasePath}/index/plugins/
func (Paths) IndexPluginsPath ¶
IndexPluginsPath returns the plugins directory of an index repository.
e.g. {BasePath}/index/default/plugins/ or {BasePath}/index/plugins/
func (Paths) InstallPath ¶
InstallPath returns the base directory for plugin installations.
e.g. {BasePath}/store
func (Paths) InstallReceiptsPath ¶
InstallReceiptsPath returns the base directory where plugin receipts are stored.
e.g. {BasePath}/receipts
func (Paths) PluginInstallPath ¶
PluginInstallPath returns the path to install the plugin.
e.g. {InstallPath}/{version}/{..files..}
func (Paths) PluginInstallReceiptPath ¶
PluginInstallReceiptPath returns the path to the install receipt for plugin.
e.g. {InstallReceiptsPath}/{plugin}.yaml
func (Paths) PluginVersionInstallPath ¶
PluginVersionInstallPath returns the path to the specified version of specified plugin.
e.g. {PluginInstallPath}/{plugin}/{version}