config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string
	BuildTime string
	Global    Archer
)

Functions

func GetApiBaseUrl

func GetApiBaseUrl(r *http.Request) string

func InitSentry

func InitSentry()

func IsDebug

func IsDebug() bool

func ParseConfig

func ParseConfig(parser *flags.Parser)

func ResolveHost

func ResolveHost()

Types

type Agent

type Agent struct {
	Devices                []string      `long:"device" ini-name:"device[]" description:"F5 BigIP Hostnames"`
	VCMPs                  []string      `long:"vcmp" ini-name:"vcmp[]" description:"F5 BigIP VCMP Hostnames"`
	ValidateCert           bool          `long:"validate-certificates" ini-name:"validate_certificates" description:"Validate HTTPS Certificate."`
	PhysicalNetwork        string        `long:"physical-network" ini-name:"physical_network" description:"Physical Network"`
	PhysicalInterface      string        `long:"physical-interface" ini-name:"physical_interface" description:"Physical Interface" default:"portchannel1"`
	PendingSyncInterval    time.Duration `` /* 143-byte string literal not displayed */
	CreateService          bool          `long:"create-service" ini-name:"create_service" description:"Auto-create Service for network injection agent."`
	ServiceName            string        `long:"service-name" ini-name:"service_name" description:"Service name for auto-created service."`
	ServicePort            int           `long:"service-port" ini-name:"service_port" description:"Service port for auto-created service."`
	ServiceRequireApproval bool          `long:"service-require-approval" ini-name:"service_require_approval" description:"Service requires approval."`
	ServiceUpstreamHost    string        `long:"service-upstream-host" ini-name:"service_upstream_host" description:"Service upstream host."`
	ServiceProxyPath       string        `` /* 131-byte string literal not displayed */
}

type ApiSettings

type ApiSettings struct {
	PolicyFile                string  `long:"policy-file" ini-name:"policy_file" description:"Use policy file" default:"policy.ini"`
	AuthStrategy              string  `` /* 148-byte string literal not displayed */
	PolicyEngine              string  `long:"policy-engine" ini-name:"policy_engine" description:"Policy engine to use, currently supported: [goslo, noop]"`
	DisablePagination         bool    `long:"disable-pagination" ini-name:"disable_pagination" description:"Disable the usage of pagination"`
	DisableSorting            bool    `long:"disable-sorting" ini-name:"disable_sorting" description:"Disable the usage of sorting"`
	PaginationMaxLimit        int64   `` /* 147-byte string literal not displayed */
	RateLimit                 float64 `long:"rate-limit" ini-name:"rate_limit" default:"100" description:"Maximum number of requests to limit per second."`
	DisableCors               bool    `` /* 138-byte string literal not displayed */
	EnableProxyHeadersParsing bool    `` /* 145-byte string literal not displayed */
}

type Archer

type Archer struct {
	ConfigFile  []string    `long:"config-file" description:"Use config file"`
	Default     Default     `group:"DEFAULT"`
	Database    Database    `group:"database"`
	ApiSettings ApiSettings `group:"api_settings"`
	ServiceAuth AuthInfo    `group:"service_auth"`
	Quota       Quota       `group:"quota"`
	Audit       Audit       `group:"audit_middleware_notifications"`
	Agent       Agent       `group:"agent"`
}

type Audit

type Audit struct {
	Enabled      bool   `long:"enable-audit" ini-name:"enabled" description:"Enables message notification bus."`
	TransportURL string `` /* 150-byte string literal not displayed */
	QueueName    string `long:"queue-name" ini-name:"queue_name" description:"RabbitMQ queue name"`
}

type AuthInfo

type AuthInfo struct {
	AuthURL                     string `ini-name:"auth_url"`
	Token                       string `ini-name:"token"`
	Username                    string `ini-name:"username"`
	UserID                      string `ini-name:"user_id" `
	Password                    string `ini-name:"password" `
	ApplicationCredentialID     string `ini-name:"application_credential_id"`
	ApplicationCredentialName   string `ini-name:"application_credential_name" `
	ApplicationCredentialSecret string `ini-name:"application_credential_secret" `
	SystemScope                 string `ini-name:"system_scope" `
	ProjectName                 string `ini-name:"project_name"`
	ProjectID                   string `ini-name:"project_id" `
	UserDomainName              string `ini-name:"user_domain_name"`
	UserDomainID                string `ini-name:"user_domain_id"`
	ProjectDomainName           string `ini-name:"project_domain_name" `
	ProjectDomainID             string `ini-name:"project_domain_id" `
	DomainName                  string `ini-name:"domain_name"`
	DomainID                    string `ini-name:"domain_id"`
	DefaultDomain               string `ini-name:"default_domain"`
	AllowReauth                 bool   `ini-name:"allow_reauth"`
}

type Database

type Database struct {
	Connection string `long:"database-connection" ini-name:"connection" description:"Connection string to use to connect to the database."`
	Trace      bool   `long:"database-trace" ini-name:"trace" description:"Enable tracing of SQL queries"`
}

type Default

type Default struct {
	Debug            bool   `short:"d" long:"debug" description:"Show debug information"`
	AvailabilityZone string `long:"availability-zone" ini-name:"availability_zone" description:"Availability zone of this node." env:"AVAILABILITY_ZONE"`
	Host             string `long:"hostname" ini-name:"host" description:"Hostname used by the server/agent. Defaults to auto-discovery."`
	Prometheus       bool   `long:"prometheus" description:"Enable prometheus exporter."`
	PrometheusListen string `` /* 131-byte string literal not displayed */
	Sentry           bool   `long:"sentry" ini-name:"sentry" description:"Enable Sentry"`
	SentryDSN        string `long:"sentry-dsn" ini-name:"sentry_dsn" description:"Sentry Data Source Name."`
	EndpointType     string `ini-name:"endpoint_type" default:"public"`
}

type Quota

type Quota struct {
	Enabled              bool  `long:"enable-quota" ini-name:"enabled" description:"Enable quotas."`
	DefaultQuotaService  int64 `long:"default-quota-service" ini-name:"service" default:"0" description:"Default quota of services per project."`
	DefaultQuotaEndpoint int64 `long:"default-quota-endpoint" ini-name:"endpoint" default:"0" description:"Default quota of endpoints per project."`
}

Jump to

Keyboard shortcuts

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