env

package
v0.0.0-...-873fb03 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileName = "envs.json"
	Current  = "Current -> "
	Default  = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FindManager

type FindManager struct {
	// contains filtered or unexported fields
}

func NewFinder

func NewFinder(homePath string, file stream.FileReadExister) FindManager

func (FindManager) Find

func (f FindManager) Find() (Holder, error)

type FindRemover

type FindRemover interface {
	Finder
	Remover
}

type FindRemoverManager

type FindRemoverManager struct {
	Finder
	Remover
}

func NewFindRemover

func NewFindRemover(f Finder, r Remover) FindRemoverManager

type FindSetter

type FindSetter interface {
	Finder
	Setter
}

type FindSetterManager

type FindSetterManager struct {
	Finder
	Setter
}

func NewFindSetter

func NewFindSetter(f Finder, s Setter) FindSetterManager

type Finder

type Finder interface {
	Find() (Holder, error)
}

type Holder

type Holder struct {
	Current string   `json:"current_env"`
	All     []string `json:"envs"`
}

type RemoveManager

type RemoveManager struct {
	// contains filtered or unexported fields
}

func NewRemover

func NewRemover(homePath string, env Finder, file stream.FileWriter) RemoveManager

func (RemoveManager) Remove

func (r RemoveManager) Remove(env string) (Holder, error)

type Remover

type Remover interface {
	Remove(env string) (Holder, error)
}

type Setter

type Setter interface {
	Set(env string) (Holder, error)
}

func NewSetter

func NewSetter(homePath string, env Finder, file stream.FileWriter) Setter

type SetterManager

type SetterManager struct {
	// contains filtered or unexported fields
}

func (SetterManager) Set

func (s SetterManager) Set(env string) (Holder, error)

Jump to

Keyboard shortcuts

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