config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: GPL-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 Config

type Config struct {
	HTTP      HTTPConfig
	Security  SecurityConfig
	Databases DatabasesConfig
	Logging   LoggingConfig
}

func New added in v0.0.5

func New() *Config

type DatabaseConfig added in v0.0.7

type DatabaseConfig struct {
	Host         string
	Port         int
	User         string
	Password     string
	DatabaseName string
	SSLMode      string
	Driver       string
}

type DatabasesConfig added in v0.0.7

type DatabasesConfig struct {
	PostgreSQL DatabaseConfig
	MySQL      DatabaseConfig
	SQLite     DatabaseConfig
}

type HTTPConfig added in v0.0.7

type HTTPConfig struct {
	Host string
	Port int
}

type JWTConfig added in v0.0.7

type JWTConfig struct {
	SecretKey       string
	Algorithm       string
	RefreshTokenTTL time.Duration
	AccessTokenTTL  time.Duration
}

type LoggingConfig added in v0.0.8

type LoggingConfig struct {
	Level       slog.Level
	LogFilePath string
}

type SecurityConfig added in v0.0.7

type SecurityConfig struct {
	HashCost int
	JWT      JWTConfig
}

Jump to

Keyboard shortcuts

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