config

package
v0.0.0-...-d7d0c66 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 3 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 {
	Log  *LogConfig
	Http *HttpConfig
}

func LoadConfigFromData

func LoadConfigFromData(data []byte) (*Config, error)

func LoadConfigFromFile

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

type HttpConfig

type HttpConfig struct {
	Port int
}

type LogConfig

type LogConfig struct {
	Level      slog.Level
	Type       LogType
	ShowSource bool
}

type LogType

type LogType string
const (
	LogTypeText    LogType = "text"
	LogTypeJSON    LogType = "json"
	LogTypeColored LogType = "colored"
)

Jump to

Keyboard shortcuts

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