Documentation ¶
Index ¶
- type Config
- func (c *Config) AddExternalApplication(name, command, argument string)
- func (c *Config) AddRepository(path, imagePath string, isFavorite bool)
- func (c *Config) ClearExternalApplications()
- func (c *Config) ClearRepositories()
- func (c *Config) GetConfigPath(configPath string) string
- func (c *Config) GetExternalApplicationByName(name string) *ExternalApplication
- func (c *Config) Load(configPath string) (err error)
- func (c *Config) RemoveExternalApplication(name string)
- func (c *Config) RemoveRepository(path string)
- func (c *Config) Save(configPath string)
- type ExternalApplication
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Repositories []*Repository `json:"repositories"` ExternalApplications []*ExternalApplication `json:"external-applications"` DateFormat string `json:"date-format"` PathColumnWidth int `json:"path-column-width"` }
Config : The main config type
func (*Config) AddExternalApplication ¶
AddExternalApplication adds an external application
func (*Config) AddRepository ¶
AddRepository adds a new repository
func (*Config) ClearExternalApplications ¶
func (c *Config) ClearExternalApplications()
ClearExternalApplications clears the slice of external applications
func (*Config) ClearRepositories ¶
func (c *Config) ClearRepositories()
ClearRepositories clears the slice of repositories
func (*Config) GetConfigPath ¶
GetConfigPath returns the path to the config file
func (*Config) GetExternalApplicationByName ¶
func (c *Config) GetExternalApplicationByName(name string) *ExternalApplication
GetExternalApplicationByName gets an external application by name
func (*Config) RemoveExternalApplication ¶
RemoveExternalApplication adds a new extenal application
func (*Config) RemoveRepository ¶
RemoveRepository adds a new repository
type ExternalApplication ¶
type ExternalApplication struct { Name string `json:"name"` Command string `json:"command"` Argument string `json:"argument"` }
ExternalApplication : An external application in the config
type Repository ¶
type Repository struct { Path string `json:"path"` ImagePath string `json:"image-path"` IsFavorite bool `json:"is-favorite"` }
Repository : A Repository in the config
Click to show internal directories.
Click to hide internal directories.