config

package
v0.0.0-...-dbb83f0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Host string
	Port string
}

App General configuration related to the Application

type Config

type Config struct {
	Redis       Redis
	App         App
	RateLimiter RateLimiter
}

Config Final Struct Configuration

type LimitValues

type LimitValues struct {
	MaxRequests     int
	TimeWindow      int64
	BlockedDuration int64
}

type RateLimiter

type RateLimiter struct {
	ByIP LimitValues
}

RateLimiter properties for configuration

type Redis

type Redis struct {
	Db   int
	Host string
	Port string
}

Redis configuration related to this specific database

type Viper

type Viper struct {
	// contains filtered or unexported fields
}

func NewViper

func NewViper(fileName string) *Viper

func (*Viper) ReadViper

func (v *Viper) ReadViper(config *Config)

Jump to

Keyboard shortcuts

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