config

package
v0.0.0-...-c18bb38 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The Directory to watch
	WatchDir string
	// Secret API Key to authenticate
	ApiKey string
	// URL to the API
	ApiUrl string
	// User configuration from `scanner.json`
	UserConfig UserConfiguration
}

func GetConfig

func GetConfig() Config

Parses and return a config from the CLI args and env args

type UserConfiguration

type UserConfiguration struct {
	Regexes struct {
		// Regexes of the extras to match
		Extra []string `json:"extras" validate:"required"`
		// Regexes of the movies to match
		Movie []string `json:"movies" validate:"required"`
	} `json:"regexes" validate:"required,dive,required"`
}

Jump to

Keyboard shortcuts

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