config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApiBaseUrl

func GetApiBaseUrl(r *http.Request) string

func ParseArgsAndRun

func ParseArgsAndRun(name string, usage string, action cli.ActionFunc, flags ...cli.Flag)

ParseArgsAndRun Evaluate --config-file flags and remove them from env

Types

type AkamaiConfig

type AkamaiConfig struct {
	EdgeRC               string `yaml:"edgerc" description:"Path to akamai edgerc file, else sourced from AKAMAI_EDGE_RC env variable."`
	Domain               string `yaml:"domain" description:"Traffic Management Domain to use (e.g. production.akadns.net)."`
	DomainType           string `` /* 175-byte string literal not displayed */
	ContractId           string `yaml:"contract_id" description:"Indicated the contract id to use, autodetects if only one contract is associated."`
	SyncInterval         int64  `yaml:"sync_interval" default:"30" description:"Sync interval for checking for pending updates"`
	MemberStatusInterval int64  `yaml:"member_status_interval" default:"60" description:"Sync interval for checking for member status"`
}

type Andromeda

type Andromeda struct {
	Default      Default               `yaml:"DEFAULT"`
	Database     Database              `yaml:"database"`
	ApiSettings  ApiSettings           `yaml:"api_settings"`
	ServiceAuth  clientconfig.AuthInfo `yaml:"service_auth"`
	Quota        Quota                 `yaml:"quota"`
	F5Config     F5Config              `yaml:"f5"`
	AkamaiConfig AkamaiConfig          `yaml:"akamai"`
	Audit        Audit                 `yaml:"audit_middleware_notifications"`
	HouseKeeping HouseKeeping          `yaml:"house_keeping"`
}
var (
	Global Andromeda
)

type ApiSettings

type ApiSettings struct {
	PolicyFile                string  `yaml:"policy-file" description:"Use policy file" default:"policy.json"`
	AuthStrategy              string  `yaml:"auth_strategy" description:"The auth strategy for API requests, currently supported: [keystone, none]"`
	PolicyEngine              string  `yaml:"policy_engine" description:"Policy engine to use, currently supported: [goslo, noop]"`
	DisablePagination         bool    `yaml:"disable_pagination" description:"Disable the usage of pagination"`
	DisableSorting            bool    `yaml:"disable_sorting" description:"Disable the usage of sorting"`
	PaginationMaxLimit        int64   `yaml:"pagination_max_limit" default:"1000" description:"The maximum number of items returned in a single response."`
	RateLimit                 float64 `yaml:"rate_limit" default:"100" description:"Maximum number of requests to limit per second."`
	DisableCors               bool    `yaml:"disable_cors" description:"Stops sending Access-Control-Allow-Origin Header to allow cross-origin requests."`
	EnableProxyHeadersParsing bool    `yaml:"enable_proxy_headers_parsing" default:"true" description:"Try parsing proxy headers for http scheme and base url."`
	EnablePolicyTracing       bool    `yaml:"enable_policy_tracing" description:"Enable policy tracing."`
}

type Audit

type Audit struct {
	Enabled      bool   `yaml:"enabled" description:"Enables message notification bus."`
	TransportURL string `yaml:"transport_url" description:"The network address and optional user credentials for connecting to the messaging backend."`
	QueueName    string `yaml:"queue_name" description:"RabbitMQ queue name"`
}

type Database

type Database struct {
	Connection string `yaml:"connection" description:"Connection string to use to connect to the database."`
}

type Default

type Default struct {
	Debug            bool   `yaml:"debug" description:"Enable debug mode."`
	LogLevel         string `yaml:"log_level" description:"Log level." default:"info"`
	Host             string `yaml:"host" description:"Hostname used by the server/agent. Defaults to auto-discovery."`
	ApiBaseURL       string `` /* 150-byte string literal not displayed */
	TransportURL     string `yaml:"transport_url" description:"The network address and optional user credentials for connecting to the messaging backend."`
	Prometheus       bool   `yaml:"prometheus" description:"Enable prometheus exporter."`
	PrometheusListen string `yaml:"prometheus_listen" default:"127.0.0.1:9090" description:"Prometheus listen TCP network address."`
	SentryDSN        string `yaml:"sentry_dsn" description:"Sentry Data Source Name."`
}

type F5Config

type F5Config struct {
	DNSServerAddress string `yaml:"dns_server_address"`
	ValidateCert     bool   `yaml:"validate_certificates"`
}

type HouseKeeping

type HouseKeeping struct {
	Enabled     bool  `yaml:"enabled" description:"Enables house keeping."`
	DeleteAfter int64 `yaml:"delete_after" default:"600" description:"Minimum seconds elapsed after cleanup of a deleted domain."`
}

type Quota

type Quota struct {
	Enabled                bool  `yaml:"enabled" description:"Enable quotas."`
	DefaultQuotaDomain     int64 `yaml:"domains" default:"0" description:"Default quota of domain per project."`
	DefaultQuotaPool       int64 `yaml:"pools" default:"0" description:"Default quota of pool per project."`
	DefaultQuotaMember     int64 `yaml:"members" default:"0" description:"Default quota of member per project."`
	DefaultQuotaMonitor    int64 `yaml:"monitors" default:"0" description:"Default quota of monitor per project."`
	DefaultQuotaDatacenter int64 `yaml:"datacenters" default:"0" description:"Default quota of datacenter per project."`
}

Jump to

Keyboard shortcuts

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