config

package
v0.0.0-...-cbb6929 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() error

Types

type BOTConfig

type BOTConfig struct {
	TOKEN string `mapstructure:"token"`
}

type Config

type Config struct {
	BOT      BOTConfig      `mapstructure:"bot"`
	OpenAI   OpenaiConfig   `mapstructure:"openai"`
	Mongo    MongoConfig    `mapstructure:"mongo"`
	Postgres PostgresConfig `mapstructure:"postgres"`
}
var GlobalConfig *Config

type MongoConfig

type MongoConfig struct {
	URI      string `mapstructure:"uri"`
	NAME     string `mapstructure:"database_name"`
	USERNAME string `mapstructure:"username"`
	PASSWORD string `mapstructure:"password"`
}

type OpenaiConfig

type OpenaiConfig struct {
	APIKey string `mapstructure:"apikey"`
}

type PostgresConfig

type PostgresConfig struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Database string `mapstructure:"database"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳