config

package
v0.0.0-...-e96b286 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQPConfig

type AMQPConfig struct {
	URI string `toml:"uri"`
}

type ClassifyConfig

type ClassifyConfig struct {
	DiscardScore float64 `toml:"discard_score"`
	MatchScore   float64 `toml:"match_score"`
}

type Config

type Config struct {
	FB       *FBConfig
	AMQP     *AMQPConfig
	DB       *DBConfig
	ES       *ESConfig
	Classify *ClassifyConfig
}

func LoadFile

func LoadFile(path string) (*Config, error)

func (*Config) Valid

func (c *Config) Valid() bool

type DBConfig

type DBConfig struct {
	Type    string `toml:"type"`
	Connstr string `toml:"connstr"`
}

type ESConfig

type ESConfig struct {
	URL string `toml:"url"`
}

type FBConfig

type FBConfig struct {
	AppID                string `toml:"app_id"`
	AppSecret            string `toml:"app_secret"`
	FeedCheckSeconds     int    `toml:"feed_check_seconds"`
	CommentsCheckSeconds int    `toml:"comments_check_seconds"`
}

Jump to

Keyboard shortcuts

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