configmanager

package
v0.0.0-...-8671791 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 1 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 {
	PlexURL         string `envconfig:"PLEX_URL" required:"true"`
	PlexToken       Secret `envconfig:"PLEX_TOKEN" required:"true"`
	MaxItems        int    `envconfig:"MAX_ITEMS" required:"true"`
	PeriodInterval  Period `envconfig:"PERIOD_INTERVAL" required:"true"`
	MovieSectionId  string `envconfig:"MOVIE_SECTION_ID" required:"true"`
	TVShowSectionId string `envconfig:"TV_SHOW_SECTION_ID" required:"true"`
}

func MustReadConfig

func MustReadConfig() Config

MustReadConfig Returns a shallow copy of application configuration. Panics if the configuration is invalid.

type Period

type Period string
const (
	PeriodDay   Period = "DAY"
	PeriodWeek  Period = "WEEK"
	PeriodMonth Period = "MONTH"
	PeriodYear  Period = "YEAR"
)

func (Period) IsValid

func (period Period) IsValid() bool

func (Period) ToInt

func (period Period) ToInt() int

func (Period) ToString

func (period Period) ToString() string

type Secret

type Secret string

func (Secret) String

func (s Secret) String() string

Jump to

Keyboard shortcuts

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