config

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config defines settings that can be modified by a user.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster added in v0.12.0

type Cluster struct {
	Period time.Duration
}

Cluster controls how to look for related articles.

func (*Cluster) Equal added in v0.12.0

func (c *Cluster) Equal(other any) bool

Equal returns true if the receiver is equal to the argument.

type Config

type Config struct {
	Global   Global
	Web      Web
	Path     Path
	Cluster  Cluster
	Loglevel Loglevel
}

Config defines the variables that a user can set.

func Read

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

Read attempts to read the configuration from the given file.

func (*Config) Equal

func (c *Config) Equal(other any) bool

Equal returns true if the receiver is equal to the argument.

type Global

type Global struct {
	Debug        bool
	CacheTimeout time.Duration
}

Global contains settings that don't fit anywhere else.

func (*Global) Equal

func (g *Global) Equal(other any) bool

Equal returns true if the receiver is equal to the argument.

type Loglevel

type Loglevel struct {
	Database   string
	DBPool     string
	Engine     string
	Cache      string
	Critic     string
	Classifier string
	Scrub      string
	Web        string
	Blacklist  string
	Analyze    string
	Main       string
}

Loglevel contains the log levels for the various subsystems.

func (*Loglevel) Equal

func (l *Loglevel) Equal(other any) bool

Equal returns true if the receiver is equal to the argument.

type Path

type Path struct {
	Base      string
	Log       string
	Database  string
	Cache     string
	Blacklist string
}

Path contains the paths to various files and folders.

func (*Path) Equal

func (p *Path) Equal(other any) bool

Equal returns true if the receiver is equal to the argument.

type Web

type Web struct {
	Address            string
	HideBoring         bool
	HideProbablyBoring bool
	ItemsPerPage       int64
	TrendDays          int64
}

Web groups the settings for the Web interface.

func (*Web) Equal

func (w *Web) Equal(other any) bool

Equal returns true if the receiver is equal to the argument.

Jump to

Keyboard shortcuts

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