config

package
v0.0.0-...-ec71ea8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	JWT          JWTConfig
	PasswordSalt string
}

type Config

type Config struct {
	Auth     *AuthConfig
	Reddis   *RedisConfig
	Gin      *GinConfig
	Http     *HTTPConfig
	Limiter  *LimiterConfig
	Postgres *PostgresConfig
}

func NewConfig

func NewConfig() (*Config, error)

type GinConfig

type GinConfig struct {
	GinMode string
}

type HTTPConfig

type HTTPConfig struct {
	Host               string
	Port               string
	ReadTimeout        time.Duration
	WriteTimeout       time.Duration
	MaxHeaderMegabytes int
}

type JWTConfig

type JWTConfig struct {
	AccessTokenTTL  time.Duration
	RefreshTokenTTL time.Duration
	SigningKey      string
}

type LimiterConfig

type LimiterConfig struct {
	RPS   int
	Burst int
	TTL   time.Duration
}

type PostgresConfig

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

type RedisConfig

type RedisConfig struct {
	Addr     string
	Password string
}

Jump to

Keyboard shortcuts

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