config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 15 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 `json:"edgerc" description:"Path to akamai edgerc file, else sourced from AKAMAI_EDGE_RC env variable."`
	Domain               string `json:"domain" description:"Traffic Management Domain to use (e.g. production.akadns.net)."`
	DomainType           string `` /* 175-byte string literal not displayed */
	ContractId           string `json:"contract_id" description:"Indicated the contract id to use, autodetects if only one contract is associated."`
	SyncInterval         int64  `json:"sync_interval" default:"30" description:"Sync interval for checking for pending updates"`
	MemberStatusInterval int64  `json:"member_status_interval" default:"60" description:"Sync interval for checking for member status"`
}

type Andromeda

type Andromeda struct {
	Verbose      bool                  `short:"v" long:"verbose" description:"Show verbose debug information"`
	Default      Default               `json:"DEFAULT"`
	Database     Database              `json:"database"`
	ApiSettings  ApiSettings           `json:"api_settings"`
	ServiceAuth  clientconfig.AuthInfo `json:"service_auth"`
	Quota        Quota                 `json:"quota"`
	F5Config     F5Config              `json:"f5"`
	AkamaiConfig AkamaiConfig          `json:"akamai"`
	Audit        Audit                 `json:"audit_middleware_notifications"`
	HouseKeeping HouseKeeping          `json:"house_keeping"`
}
var (
	Global Andromeda
)

type ApiSettings

type ApiSettings struct {
	PolicyFile                string  `short:"p" json:"policy-file" description:"Use policy file" default:"policy.json"`
	AuthStrategy              string  `json:"auth_strategy" description:"The auth strategy for API requests, currently supported: [keystone, none]"`
	PolicyEngine              string  `json:"policy_engine" description:"Policy engine to use, currently supported: [goslo, noop]"`
	DisablePagination         bool    `json:"disable_pagination" description:"Disable the usage of pagination"`
	DisableSorting            bool    `json:"disable_sorting" description:"Disable the usage of sorting"`
	PaginationMaxLimit        int64   `json:"pagination_max_limit" default:"1000" description:"The maximum number of items returned in a single response."`
	RateLimit                 float64 `json:"rate_limit" default:"100" description:"Maximum number of requests to limit per second."`
	DisableCors               bool    `json:"disable_cors" description:"Stops sending Access-Control-Allow-Origin Header to allow cross-origin requests."`
	EnableProxyHeadersParsing bool    `` /* 145-byte string literal not displayed */
}

type Audit

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

type Database

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

type Default

type Default struct {
	Host             string `long:"hostname" ini-name:"host" description:"Hostname used by the server/agent. Defaults to auto-discovery."`
	ApiBaseURL       string `` /* 150-byte string literal not displayed */
	TransportURL     string `json:"transport_url" description:"The network address and optional user credentials for connecting to the messaging backend."`
	Prometheus       bool   `long:"prometheus" description:"Enable prometheus exporter."`
	PrometheusListen string `` /* 131-byte string literal not displayed */
	SentryDSN        string `long:"sentry-dsn" ini-name:"sentry_dsn" description:"Sentry Data Source Name."`
}

type F5Config

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

type HouseKeeping

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

type Quota

type Quota struct {
	Enabled                bool  `json:"enabled" description:"Enable quotas."`
	DefaultQuotaDomain     int64 `json:"domains" default:"0" description:"Default quota of domain per project."`
	DefaultQuotaPool       int64 `json:"pools" default:"0" description:"Default quota of pool per project."`
	DefaultQuotaMember     int64 `json:"members" default:"0" description:"Default quota of member per project."`
	DefaultQuotaMonitor    int64 `json:"monitors" default:"0" description:"Default quota of monitor per project."`
	DefaultQuotaDatacenter int64 `json:"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