config

package
v0.0.0-...-c756ae2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 7 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 struct {
	Token string `mapstructure:"token"`
}

type Config

type Config struct {
	Bot Bot `mapstructure:"bot"`
	DB  DB  `mapstructure:"db"`
	Log Log `mapstructure:"log"`
}

func ReadConfig

func ReadConfig(configPath *string) (*Config, error)

type DB

type DB struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	Database string `mapstructure:"database"`
	Host     string `mapstructure:"host"`
}

func (*DB) CreateDB

func (d *DB) CreateDB(ctx context.Context) (*pg.DB, error)

type Log

type Log struct {
	Level string `mapstructure:"level"`
}

func (*Log) SetLogger

func (l *Log) SetLogger() error

Jump to

Keyboard shortcuts

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