config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: AGPL-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 Bot

type Bot interface {
	Token() string
	ClientId() string
	Permissions() string
	Scopes() []string
}

type Config

type Config interface {
	Database() Database
	Bot() Bot
	Log() Log
	Debug() string
}

func NewConfigProvider

func NewConfigProvider(v *viper.Viper) Config

func Setup

func Setup(configFile string, v *viper.Viper, logger logrus.FieldLogger) Config

type Database

type Database interface {
	Uri() (string, error)
	Database() (string, error)
	UseInMemoryDatabase() bool
}

type Log

type Log interface {
	Level() logrus.Level
	Debug() bool
}

Jump to

Keyboard shortcuts

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