config

package
v0.0.0-...-0f02baf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 8 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 {
	ClientID, ClientSecret,
	RedditUsername, RedditPassword string
	Subreddits  []string
	RateLimit   time.Duration
	LogLevel    slog.Level
	TopNAuthors int
}

func Configure

func Configure(envVars io.Reader) (*Config, error)

type InvalidConfigInputError

type InvalidConfigInputError struct {
	// contains filtered or unexported fields
}

InvalidConfigInputError is return when a required configuration setting is found but invalid.

func NewInvalidConfigInputError

func NewInvalidConfigInputError(env, reason string) *InvalidConfigInputError

func (*InvalidConfigInputError) Error

func (i *InvalidConfigInputError) Error() string

type MissingConfigInputError

type MissingConfigInputError struct {
	// contains filtered or unexported fields
}

MissingConfigInputError is return when a required configuration setting is not found.

func NewMissingConfigInputError

func NewMissingConfigInputError(env string) *MissingConfigInputError

func (*MissingConfigInputError) Error

func (m *MissingConfigInputError) Error() string

Jump to

Keyboard shortcuts

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