config

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = `` /* 277-byte string literal not displayed */

)

Functions

func WriteDefaultConfig

func WriteDefaultConfig(path string) error

Types

type Config

type Config struct {
	TimestampRegexes []Regex        `yaml:"timestamps"`
	Rules            Rules          `yaml:"rules"`
	UpdateFrequency  *time.Duration `yaml:"updateFrequency"`
	RulesVersion     string         `yaml:"rulesVersion"`
	AcceptUpdates    bool           `yaml:"acceptUpdates"`
	DataSources      string         `yaml:"dataSources"`
}

func LoadConfig

func LoadConfig(dir, file string) (*Config, error)

func LoadConfigFromBytes

func LoadConfigFromBytes(data string) (*Config, error)

func (*Config) ResolveOpts

func (c *Config) ResolveOpts() (opts []resolve.OptT)

type Regex

type Regex struct {
	Pattern string `yaml:"pattern"`
	Format  string `yaml:"format"`
}

type Rules

type Rules struct {
	Paths    []string `yaml:"paths"`
	Disabled bool     `yaml:"disableCommunityRules"`
}

Jump to

Keyboard shortcuts

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