config

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 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 {
	Protocol  string
	Host      string
	Port      int
	HTTPSPort int

	// BodySizeLimit is the limit of the request body size.
	BodySizeLimit int64

	//
	NetworkType      string
	UnixDomainSocket string

	// TLS
	// TLS Certificate
	TLSCertFile string
	// TLS Private Key
	TLSKeyFile string
	// TLS Ca Certificate
	TLSCaCertFile string
	//
	TLSCert string
	TLSKey  string

	//
	LogLevel string `config:"log_level"`
	//
	SecretKey string `config:"secret_key"`
	//
	Session session.Config `config:"session"`
	//
	Cache cache.Config `config:"cache"`
	//
	Redis Redis `config:"redis"`
	//
	Banner string
	//
	Monitor Monitor `config:"monitor"`

	// Logger
	Logger Logger `config:"logger"`
}

Config defines the config of zoox.Application.

type Logger added in v1.16.3

type Logger struct {
	// Level is the log level.
	Level string `config:"level"`

	// Middleware is the logger middleware.
	Middleware `config:"middleware"`
}

Logger ...

type Middleware added in v1.16.3

type Middleware struct {
	// Disabled is the logger middleware disabled.
	Disabled bool `config:"disabled"`
}

Middleware ...

type Monitor

type Monitor struct {
	Prometheus `config:"prometheus"`

	Sentry `config:"sentry"`
}

Monitor defines the config of monitor.

type Prometheus

type Prometheus struct {
	Enabled bool   `config:"enabled"`
	Path    string `config:"path"`
}

Prometheus ...

type Redis

type Redis struct {
	Host     string `config:"host"`
	Port     int    `config:"port"`
	DB       int    `config:"db"`
	Username string `config:"username"`
	Password string `config:"password"`
}

Redis defines the config of redis.

type Sentry

type Sentry struct {
	Enabled bool `config:"enabled"`
	//
	DSN   string `config:"dsn"`
	Debug bool   `config:"debug"`
	//
	WaitForDelivery bool          `config:"wait_for_delivery"`
	Timeout         time.Duration `config:"timeout"`
}

Sentry ...

Jump to

Keyboard shortcuts

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