state

package
v0.0.0-...-fe26432 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Content types.ContextAlias
	// contains filtered or unexported fields
}

func GetDefaultAlias

func GetDefaultAlias(stateDir string) (*Alias, error)

GetDefaultAlias get the default alias with the path to the state file set

func (*Alias) ContainsAlias

func (a *Alias) ContainsAlias(alias string) *string

ContainsAlias checks if the given alias already exists if yes, returns the context name that is currently mapped to the alias

func (*Alias) WriteAlias

func (a *Alias) WriteAlias(aliasName, contextName string) (*string, error)

WriteAlias write the alias state file with new Content returns the name of the overwritten context name in case there already exited a mapping context -> alias or returns nil

func (*Alias) WriteAllAliases

func (a *Alias) WriteAllAliases() error

WriteAllAliases overwrites the alias state file with new Content

Jump to

Keyboard shortcuts

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