config

package
v0.0.0-...-30e58cd Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DB
	DefaultDBPath = "data/dms.db"

	// HTTP
	DefaultHTTPHost          = "0.0.0.0"
	DefaultHTTPPort          = "8080"
	DefaultReadHeaderTimeout = 5

	// Discord
	DefaultDiscordReadMessages = true
	DefaultDiscordGuildID      = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Discord DiscordConfig
	HTTP    HTTPConfig
	DB      DBConfig
	Log     LogConfig
}

func Init

func Init() (*Config, error)

type DBConfig

type DBConfig struct {
	Path string
}

type DiscordConfig

type DiscordConfig struct {
	Token        string
	ReadMessages bool
	GuildID      string
}

type HTTPConfig

type HTTPConfig struct {
	Host              string
	Port              string
	ReadHeaderTimeout int
}

type LogConfig

type LogConfig struct {
	Level  string
	Format string
}

Jump to

Keyboard shortcuts

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