config

package
v0.0.0-...-37d405c Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Config represents a loaded config
	Config struct {
		HostName string `koanf:"hostname"`
		Port     int    `koanf:"port"`
		Prefork  bool   `koanf:"prefork"`
		RedisURI string `koanf:"redis_uri"`

		RateLimit struct {
			Requests int           `koanf:"requests"`
			Duration time.Duration `koanf:"duration"`
		} `koanf:"ratelimit"`

		GithubOAuth OAuthConfiguration `koanf:"github_oauth"`

		DiscordOAuth OAuthConfiguration `koanf:"discord_oauth"`
	}
)

Functions

func Load

func Load() error

Load configuration from environment or file

Types

type OAuthConfiguration

type OAuthConfiguration struct {
	ClientID     string `koanf:"client_id"`
	ClientSecret string `koanf:"client_secret"`
}

Jump to

Keyboard shortcuts

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