config

package
v0.0.0-...-bd45f38 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MIT Imports: 6 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 {
	Debug    bool `config:"debug"`
	Log      Log
	Discord  Discord
	Lavalink Lavalink
}

type ConfitaProvider

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

func NewConfitaProvider

func NewConfitaProvider() *ConfitaProvider

func (ConfitaProvider) Instance

func (p ConfitaProvider) Instance() *Config

func (*ConfitaProvider) Load

func (p *ConfitaProvider) Load() error

type Discord

type Discord struct {
	Token   string `config:"discord.token,required"`
	OwnerId string `config:"discord.ownerid"`
}
type Lavalink struct {
	HttpAddress string `config:"lavalink.httpaddress"`
	WSAddress   string `config:"lavalink.wsaddress"`
	Password    string `config:"lavalink.password"`
}

type Log

type Log struct {
	Level logrus.Level `config:"log.level"`
}

type Provider

type Provider interface {
	Load() error
	Instance() *Config
}

Jump to

Keyboard shortcuts

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