config

package
v0.0.0-...-f5e1a23 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(reload func())

Types

type Answer

type Answer struct {
	Auto bool
}

type Config

type Config struct {
	Answers              map[int64]Answer
	ReplaceMyselfLinks   map[int64]ReplaceMyselfLink
	ReplaceFragments     map[int64]map[string]string
	Sources              map[int64]Source
	Reports              Reports
	Forwards             map[string]Forward
	DeleteSystemMessages map[int64]struct{}
}

func Load

func Load() (*Config, error)

type Forward

type Forward struct {
	From            int64
	To              []int64 // TODO: map[int64]struct{}
	Exclude         string
	Include         string
	IncludeSubmatch []IncludeSubmatch
	SendCopy        bool
	CopyOnce        bool
	Indelible       bool
	Check           int64 // то, что нашёл Exclude
	Other           int64 // то, что отсек Exclude
}

type IncludeSubmatch

type IncludeSubmatch struct {
	Regexp string
	Group  int64
	Match  []string
}
type Link struct {
	Title string
	For   []int64 // TODO: map[int64]struct{}
}
type ReplaceMyselfLink struct {
	DeleteExternal bool
}

type Reports

type Reports struct {
	Template string
	For      []int64 // TODO: map[int64]struct{}
}

type Sign

type Sign struct {
	Title string
	For   []int64 // TODO: map[int64]struct{}
}

type Source

type Source struct {
	Sign Sign
	Link Link
}

Jump to

Keyboard shortcuts

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