config

package
v0.0.0-...-541f7c5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultDir

func GetDefaultDir() (string, error)

Types

type Config

type Config struct {
	Core   CoreConfig   `toml:"core"`
	Gist   GistConfig   `toml:"gist"`
	Flag   FlagConfig   `toml:"flag"`
	Screen ScreenConfig `toml:"screen"`
}
var Conf Config

func (*Config) LoadFile

func (cfg *Config) LoadFile(file string) error

type CoreConfig

type CoreConfig struct {
	Editor    string `toml:"editor"`
	SelectCmd string `toml:"selectcmd"`
	TomlFile  string `toml:"tomlfile"`
	User      string `toml:"user"`
}

type FlagConfig

type FlagConfig struct {
	OpenURL      bool `toml:"open_url"`
	BlogMode     bool `toml:"blog_mode"`
	StarredItems bool `toml:"starred"`

	NewPrivate  bool `toml:"new_private"`
	OpenBaseURL bool `toml:"-"`
}

type GistConfig

type GistConfig struct {
	Token       string        `toml:"token"`
	BaseURL     string        `toml:"base_url"`
	ApiURL      string        `toml:"api_url"`
	Dir         string        `toml:"dir"`
	FileExt     string        `toml:"file_ext"`
	UseCache    bool          `toml:"use_cache"`
	CacheTTL    time.Duration `toml:"cache_ttl"`
	RunnableExt []string      `toml:"runnable_ext"`
}

type ScreenConfig

type ScreenConfig struct {
	Columns []string `toml:"columns"`
}

Jump to

Keyboard shortcuts

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