aliasconf

package
v0.0.0-...-014f496 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasJSON

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

func (*AliasJSON) Flush

func (doc *AliasJSON) Flush() error

func (*AliasJSON) GetAlias

func (doc *AliasJSON) GetAlias(key string) (AliasValue, error)

func (*AliasJSON) GetAliases

func (doc *AliasJSON) GetAliases() []string

func (*AliasJSON) Load

func (doc *AliasJSON) Load() error

func (*AliasJSON) SetAlias

func (doc *AliasJSON) SetAlias(key string, alias AliasValue)

type AliasMap

type AliasMap map[string]AliasValue

type AliasValue

type AliasValue struct {
	// Path the alias points to
	Path string
	// Description of the alias
	Desc string
}

AliasValue is the content of an alias

type Aliaser

type Aliaser interface {
	GetAlias(key string) (AliasValue, error)
	SetAlias(key string, value AliasValue)
	GetAliases() []string
	// Flush saves actual aliases to file
	Flush() error
	// Load all aliases from file
	Load() error
}

Aliaser defines interface for getting, setting and persisting aliases

Jump to

Keyboard shortcuts

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