config

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allowed

type Allowed struct {
	IPs      []string     // static list of allowed IPs - requests from those IPS will be allowed
	UAs      []string     // only those user agents' names will be allowed, all other will be rejected
	Provider AuthProvider // auth provider
}

Allowed config (GET, HEAD, OPTIONS requests only)

type AuthProvider

type AuthProvider struct {
	URL      string
	Login    string
	Password string
}

type Cache

type Cache struct {
	Disabled bool // cache disabled
	TTL      int  // cache TTL in minutes
	Size     int  // cache size
}

Cache config

type Config

type Config struct {
	Port         string              // http port
	LogLevel     string              // log level
	SentryDSN    string              // sentry dsn
	Healthchecks Healthchecks        // healthchecks config
	Target       Target              // target config
	Cache        Cache               // cache config
	Allowed      Allowed             // allowed ips and user agents (GET, HEAD, OPTIONS requests only)
	Trusted      Trusted             // trusted ips (PATCH, POST, PUT, DELETE requests)
	Metrics      *echobasicauth.Auth // metrics basic auth
}

Config for DRP service

func New

func New() *Config

New config

type Healthchecks

type Healthchecks struct {
	URL  string
	UUID string
}

Healthchecks.io config

type Target

type Target struct {
	Scheme string
	Host   string
}

Target (backend) config

type Trusted

type Trusted struct {
	IPs []string // static list of trusted IPs - requests from those IPS will be allowed
}

Trusted config (PATCH, POST, PUT, DELETE requests)

Jump to

Keyboard shortcuts

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