config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const ProgramName = "limo"

ProgramName is the program name

View Source
const Version = "0.5.0"

Version is the semver-compliant program version

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DatabasePath string                    `yaml:"databasePath"`
	IndexPath    string                    `yaml:"indexPath"`
	Services     map[string]*ServiceConfig `yaml:"services"`
	Outputs      map[string]*OutputConfig  `yaml:"outputs"`
}

Config contains configuration information

func ReadConfig

func ReadConfig() (*Config, error)

ReadConfig reads the configuration information

func (*Config) GetOutput added in v0.5.0

func (config *Config) GetOutput(name string) *OutputConfig

GetOutput returns the configuration information for an output

func (*Config) GetService

func (config *Config) GetService(name string) *ServiceConfig

GetService returns the configuration information for a service

func (*Config) WriteConfig

func (config *Config) WriteConfig() error

WriteConfig writes the configuration information

type OutputConfig added in v0.5.0

type OutputConfig struct {
	SpinnerIndex    int    `yaml:"spinnerIndex"`
	SpinnerInterval int    `yaml:"spinnerInterval"`
	SpinnerColor    string `yaml:"spinnerColor"`
}

OutputConfig sontains configuration information for an output

type ServiceConfig

type ServiceConfig struct {
	Token string
	User  string
}

ServiceConfig contains configuration information for a service

Jump to

Keyboard shortcuts

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