config

package
v1.15.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcmeVaultConfig added in v1.12.0

type AcmeVaultConfig struct {
	Vault                VaultConfig     `yaml:"vault" envPrefix:"VAULT_" validate:"required"`
	AcmeEmail            string          `yaml:"email" env:"ACME_EMAIL" validate:"required,email"`
	AcmeUrl              string          `` /* 157-byte string literal not displayed */
	AcmeDnsProvider      string          `yaml:"acmeDnsProvider" env:"ACME_DNS_PROVIDER"`
	AcmeCustomDnsServers []string        `yaml:"acmeCustomDnsServers,omitempty" env:"ACME_CUSTOM_DNS_SERVERS" validate:"dive,ip"`
	IntervalSeconds      int             `yaml:"intervalSeconds" env:"INTERVAL_SECONDS" validate:"min=3600,max=86400"`
	Domains              []DomainsConfig `yaml:"domains" validate:"required,dive"`
	MetricsAddr          string          `yaml:"metricsAddr" env:"METRICS_ADDR" validate:"omitempty,tcp_addr"`
	Verbose              bool            `yaml:"verbose" env:"VERBOSE"`
}

func GetConfig added in v1.14.0

func GetConfig(path string) (AcmeVaultConfig, error)

func (AcmeVaultConfig) Validate added in v1.12.0

func (conf AcmeVaultConfig) Validate() error

type DomainsConfig added in v1.12.0

type DomainsConfig struct {
	Domain string   `yaml:"domain" validate:"required,fqdn"`
	Sans   []string `yaml:"sans,omitempty" validate:"dive,fqdn"`
}

func (DomainsConfig) String added in v1.12.0

func (a DomainsConfig) String() string

type VaultConfig

type VaultConfig struct {
	Addr       string `yaml:"addr" env:"ADDR" validate:"required,http_url"`
	AuthMethod string `yaml:"authMethod" env:"AUTH_METHOD" validate:"required,oneof=token approle kubernetes implicit"`
	Token      string `yaml:"token" env:"TOKEN" validate:"required_if=AuthMethod 'token'"`

	RoleId       string `yaml:"roleId" env:"APPROLE_ROLE_ID" validate:"required_if=AuthMethod 'approle'"`
	SecretId     string `` /* 131-byte string literal not displayed */
	SecretIdFile string `` /* 132-byte string literal not displayed */

	K8sRoleId    string `yaml:"k8sRoleId" env:"K8S_ROLE_ID" validate:"required_if=AuthMethod 'kubernetes'"`
	K8sMountPath string `yaml:"k8sMountPath" env:"K8S_MOUNT" `

	PathPrefix       string `yaml:"pathPrefix" env:"PATH_PREFIX" validate:"required,startsnotwith=/,startsnotwith=/secret,endsnotwith=/,ne=acmevault"`
	DomainPathFormat string `yaml:"domainPathFormat" env:"DOMAIN_PATH_FORMAT" validate:"omitempty,containsrune=%"`

	Kv2MountPath string `yaml:"kv2MountPath" env:"KV2_MOUNT" validate:"required,endsnotwith=/,startsnotwith=/"`

	AwsMountPath string `yaml:"awsMountPath" env:"AWS_MOUNT" validate:"required,endsnotwith=/,startsnotwith=/"`
	AwsRole      string `yaml:"awsRole" env:"AWS_ROLE" validate:"required"`
}

func (*VaultConfig) LoadSecretIdFromFile added in v1.5.0

func (conf *VaultConfig) LoadSecretIdFromFile() bool

func (*VaultConfig) UseAutoRenewAuth added in v1.12.0

func (conf *VaultConfig) UseAutoRenewAuth() bool

func (*VaultConfig) Validate

func (conf *VaultConfig) Validate() error

Jump to

Keyboard shortcuts

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