config

package
v3.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 License: MIT Imports: 7 Imported by: 4

Documentation

Overview

Package config provides configuration functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assets

type Assets struct {
	GATrackingCode string     `yaml:"gaTrackingCode"`
	Menu           AssetsMenu `yaml:"menu"`
}

Assets represents the structure of the config assets field

type AssetsMenu

type AssetsMenu struct {
	Caption string            `yaml:"caption"`
	Items   []AssetsMenuItems `yaml:"items"`
}

AssetsMenu represents the structure of the config assets menu field

type AssetsMenuItems

type AssetsMenuItems struct {
	Type    string `yaml:"type"`
	Caption string `yaml:"caption"`
	Target  string `yaml:"target"`
}

AssetsMenuItems represents the structure of the config assets menu items field

type Config

type Config struct {
	File      string
	Search    Search     `yaml:"search"`
	Listen    Listen     `yaml:"listen"`
	Assets    Assets     `yaml:"assets"`
	Providers []Provider `yaml:"providers"`
}

Config represents a configuration

func (*Config) Load

func (config *Config) Load() error

Load loads the configuration from the given file

type Listen

type Listen struct {
	Address   string `yaml:"address"`
	Path      string `yaml:"path"`
	Providers string `yaml:"providers"`
}

Listen represents the structure of the config listen field

type Provider

type Provider struct {
	Provider string `yaml:"provider"`
	Name     string `yaml:"name"`
	Title    string `yaml:"title"`
	Priority int64  `yaml:"priority"`
	URL      string `yaml:"url"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Token    string `yaml:"token"`
	Key      string `yaml:"key"`
	Repo     string `yaml:"repo"`
	Query    string `yaml:"query"`
	Rewrite  string `yaml:"rewrite"`
}

Provider represents the structure of the config provider field

type Search struct {
	GotoCmd    string        `yaml:"gotoCmd"`
	TimeoutStr string        `yaml:"timeout"`
	Timeout    time.Duration `yaml:"-"`
}

Search represents the structure of the config search field

Jump to

Keyboard shortcuts

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