util

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package util contains common functionality for "utilities" required by the bot and feed poller.

This file is for processing the application's configuration from a YAML file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IRC              *ircConfig   `yaml:"irc"`
	UnparsedLogLevel string       `yaml:"log_level"`
	RSS              []*RSSConfig `yaml:"rss"`

	LogLevel logrus.Level
}

Config contains the entire application's configuration.

func NewConfig

func NewConfig(params ...string) *Config

NewConfig sets up the application's configuration.

type RSSConfig

type RSSConfig struct {
	Channels   []string `yaml:"channels"`
	FeedURL    string   `yaml:"feed_url"`
	PollDelay  int      `yaml:"poll_delay"`
	MaxHistory int      `yaml:"max_history"`

	PollDelayMinutes time.Duration
}

RSSConfig contains config items specific to the RSS feed poller.

Jump to

Keyboard shortcuts

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