config

package
v0.0.0-...-728c5d1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Location = "config/config.toml"
	Version  = "2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Version            string  `toml:"version"`
	FetchEveryXMinutes uint    `toml:"fetch_every_X_minutes"`
	Redis              *Redis  `toml:"redis"`
	Feeds              []*Feed `toml:"feed"`
}

func (*Config) GetRedis

func (cfg *Config) GetRedis() (*redis.Client, error)

func (*Config) Load

func (cfg *Config) Load()

type Feed

type Feed struct {
	RssFeedUrl string   `toml:"rss_feed_url"`
	ServerUrl  string   `toml:"server_url"`
	Token      string   `toml:"token"`
	Enabled    bool     `toml:"enabled"`
	Language   string   `toml:"language"`
	Tags       []string `toml:"tags"`
}

func (*Feed) GetUrl

func (f *Feed) GetUrl(uri string) string

type Redis

type Redis struct {
	Host     string `toml:"host"`
	Port     uint   `toml:"port"`
	Password string `toml:"password"`
}

Jump to

Keyboard shortcuts

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