18 lines
386 B
Go
18 lines
386 B
Go
|
|
package service
|
||
|
|
|
||
|
|
type Alias struct {
|
||
|
|
Name string `json:"name"`
|
||
|
|
Command string `json:"command"`
|
||
|
|
Description string `json:"description,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type Config interface {
|
||
|
|
GetUser() string
|
||
|
|
SetUser(username string) error
|
||
|
|
GetAlias(name string) (*Alias, error)
|
||
|
|
SetAlias(alias *Alias) error
|
||
|
|
DeleteAlias(name string) error
|
||
|
|
ListAliases() ([]*Alias, error)
|
||
|
|
Save() error
|
||
|
|
}
|