config

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFS embed.FS

Functions

func LoadRevCatConfig

func LoadRevCatConfig(fSys fs.FS, fp string, conf *RevCatConfig) error

func LoadZoomConfig

func LoadZoomConfig(fSys fs.FS, fp string, conf *ZoomConfig) error

Types

type Client

type Client struct {
	Name      string           `toml:"name"`
	Apikey    string           `toml:"apikey"`
	JWTSecret string           `toml:"jwtsecret"`
	Groups    []string         `toml:"groups"`
	AND       []ClientANDQuery `toml:"and"`
}

type ClientANDQuery

type ClientANDQuery struct {
	OR []ClientOrQuery `toml:"or"`
}

type ClientOrQuery

type ClientOrQuery struct {
	Field  string   `toml:"field"`
	Values []string `toml:"values"`
}

type ElasticSearchConfig

type ElasticSearchConfig struct {
	Endpoint []string         `toml:"endpoint"`
	Index    string           `toml:"index"`
	ApiKey   config.EnvString `toml:"apikey"`
	Debug    bool             `toml:"debug"`
}

type RevCatConfig

type RevCatConfig struct {
	LocalAddr    string `toml:"localaddr"`
	ExternalAddr string `toml:"externaladdr"`
	TLSCert      string `toml:"tlscert"`
	TLSKey       string `toml:"tlskey"`

	LogFile  string `toml:"logfile"`
	LogLevel string `toml:"loglevel"`
	Badger   string `toml:"badger"`

	ElasticSearch ElasticSearchConfig `toml:"elasticsearch"`

	Client []*Client `toml:"client"`
}

type ZoomConfig

type ZoomConfig struct {
	LogFile         string              `toml:"logfile"`
	LogLevel        string              `toml:"loglevel"`
	ElasticSearch   ElasticSearchConfig `toml:"elasticsearch"`
	Groups          []string            `toml:"groups"`
	Client          []*Client           `toml:"client"`
	ZoomImageHeight int                 `toml:"zoomimageheight"`
	AspectRatio     float64             `toml:"aspectratio"`
	Mediaserver     string              `toml:"mediaserver"`
	CollagePath     string              `toml:"collagepath"`
}

Jump to

Keyboard shortcuts

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