config

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SensitiveFields = []string{"SecretId"}

Functions

func PrintFields added in v1.10.0

func PrintFields(data any, ignoredKeys ...string)

Types

type AcmeVaultConfig added in v1.12.0

type AcmeVaultConfig struct {
	Vault                VaultConfig     `yaml:"vault" validate:"required"`
	AcmeEmail            string          `yaml:"email" validate:"required,email"`
	AcmeUrl              string          `` /* 142-byte string literal not displayed */
	AcmeDnsProvider      string          `yaml:"acmeDnsProvider"`
	AcmeCustomDnsServers []string        `yaml:"acmeCustomDnsServers,omitempty" validate:"dive,ip"`
	IntervalSeconds      int             `yaml:"intervalSeconds" validate:"min=3600,max=86400"`
	Domains              []DomainsConfig `yaml:"domains" validate:"required,dive"`
	MetricsAddr          string          `yaml:"metricsAddr" validate:"omitempty,tcp_addr"`
}

func Read added in v1.12.0

func Read(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" validate:"required,http_url"`
	AuthMethod string `yaml:"authMethod" validate:"required,oneof=token approle kubernetes implicit"`
	Token      string `yaml:"token" validate:"required_if=AuthMethod 'token'"`

	RoleId       string `yaml:"roleId" validate:"required_if=AuthMethod 'approle'"`
	SecretId     string `yaml:"secretId" validate:"excluded_unless=SecretIdFile '',required_if=SecretIdFile '' AuthMethod 'approle'"`
	SecretIdFile string `yaml:"secretIdFile" validate:"excluded_unless=SecretId '',required_if=SecretId '' AuthMethod 'approle'"`

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

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

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

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

func (*VaultConfig) LoadSecretIdFromFile added in v1.5.0

func (conf *VaultConfig) LoadSecretIdFromFile() bool

func (*VaultConfig) Print

func (conf *VaultConfig) Print()

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