Documentation ¶
Index ¶
- Constants
- func AddEntryToLoadout(name string, key string, value string, tags []string) error
- func CompareLoadouts(old Loadout, new Loadout) bool
- func DisableLogin()
- func EditLoadout(name string) error
- func EnableLogin()
- func GetEnvtabSlice(path string) []string
- func InitEnvtab(path string) string
- func RemoveLoadout(name string) error
- func RenameLoadout(oldName, newName string) error
- func ShowLoginStatus()
- func WriteLoadout(name string, loadout *Loadout) error
- type Loadout
- func (l Loadout) Export()
- func (l *Loadout) PrintLoadout() error
- func (l *Loadout) ReplaceTags(tags []string) error
- func (l *Loadout) UpdateDescription(description string) error
- func (l *Loadout) UpdateEntry(key string, value string) error
- func (l *Loadout) UpdateLoadedAt() error
- func (l *Loadout) UpdateLogin(login bool) error
- func (l *Loadout) UpdateTags(tags []string) error
- func (l *Loadout) UpdateUpdatedAt() error
- type LoadoutMetadata
- type LoadoutTemplate
- type LoadoutTemplates
Constants ¶
View Source
const (
ENVTAB_DIR = ".envtab"
)
Variables ¶
This section is empty.
Functions ¶
func AddEntryToLoadout ¶
Write a key-value pair to a loadout (and optionally any tags)
func CompareLoadouts ¶
func DisableLogin ¶
func DisableLogin()
func EditLoadout ¶
Enter an interactive session to edit a loadout file
func EnableLogin ¶
func EnableLogin()
func GetEnvtabSlice ¶
Find all YAML files in the envtab directory, remove the extension, and return them as a slice
func InitEnvtab ¶
Create the envtab directory if it doesn't exist and return the path
func ShowLoginStatus ¶
func ShowLoginStatus()
func WriteLoadout ¶
Write a Loadout struct to file
Types ¶
type Loadout ¶
type Loadout struct { Metadata LoadoutMetadata `json:"metadata" yaml:"metadata"` Entries map[string]string `json:"entries" yaml:"entries"` }
func MakeLoadoutFromTemplate ¶
func ReadLoadout ¶
Read a loadout from file and return a Loadout struct
func (*Loadout) PrintLoadout ¶
func (*Loadout) ReplaceTags ¶
func (*Loadout) UpdateDescription ¶
func (*Loadout) UpdateLoadedAt ¶
func (*Loadout) UpdateLogin ¶
func (*Loadout) UpdateTags ¶
func (*Loadout) UpdateUpdatedAt ¶
type LoadoutMetadata ¶
type LoadoutMetadata struct { CreatedAt string `json:"createdAt" yaml:"createdAt"` LoadedAt string `json:"loadedAt" yaml:"loadedAt"` UpdatedAt string `json:"updatedAt" yaml:"updatedAt"` Login bool `json:"login" yaml:"login"` Tags []string `json:"tags" yaml:"tags"` Description string `json:"description" yaml:"description"` }
type LoadoutTemplate ¶
type LoadoutTemplates ¶
type LoadoutTemplates struct {
Templates map[string]LoadoutTemplate `json:"templates" yaml:"templates"`
}
Click to show internal directories.
Click to hide internal directories.