app

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerURL      string       `toml:"server_url"`
	UserID         string       `toml:"user_id"`
	Password       string       `toml:"password"`
	DefaultChannel string       `toml:"default_channel"`
	IgnoreUsers    []string     `toml:"ignore_users"`
	LogFile        string       `toml:"log_file,omitempty"`
	PidFile        string       `toml:"pid_file,omitempty"`
	ConnectionLog  bool         `toml:"connection_log"`
	Debug          bool         `toml:"debug"`
	Feeds          *FeedsConfig `toml:"feeds"`
}

Config is a configuration for mybot.

func LoadConfigFile

func LoadConfigFile(file string) (*Config, error)

type FeedsConfig

type FeedsConfig struct {
	FeedsFile  string `toml:"feeds_file,omitempty"`
	StatesFile string `toml:"states_file,omitempty"`
	NumWorkers int    `toml:"workers,omitempty"`
	Channel    string `toml:"channel,omitempty"`
	Title      string `toml:"title,omitempty"`
	Schedule   string `toml:"schedule"`
}

FeedsConfig is a configuration for feedcrawler.

func (*FeedsConfig) WatcherConfig added in v0.2.0

func (fc *FeedsConfig) WatcherConfig() *feedwatcher.Config

type PIDFile

type PIDFile string

func NewPIDFile

func NewPIDFile(pidfile string) (PIDFile, error)

func (PIDFile) Create

func (p PIDFile) Create() error

func (PIDFile) Exists

func (p PIDFile) Exists() bool

func (PIDFile) Remove

func (p PIDFile) Remove() error

Jump to

Keyboard shortcuts

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