Documentation ¶
Index ¶
Constants ¶
View Source
const ( AddrFamilyIpv6 = "ip6" AddrFamilyIpv4 = "ip4" )
Variables ¶
View Source
var SensitiveFields = []string{"KeyPair"}
Functions ¶
func IsValidUrl ¶
func PrintFields ¶ added in v1.12.1
func ValidateConfig ¶ added in v1.12.0
Types ¶
type EmailConfig ¶ added in v1.11.0
type EmailConfig struct { From string `yaml:"from" env:"EMAIL_FROM" validate:"required_with=SmtpHost,omitempty,required_without=FromFile"` FromFile string `yaml:"from_file" env:"EMAIL_FROM_FILE" validate:"required_with=SmtpHost,omitempty,required_without=From"` To []string `yaml:"to" env:"EMAIL_TO" envSeparator:";" validate:"required_with=SmtpHost,omitempty,required_without=ToFile"` ToFile string `yaml:"to_file" env:"EMAIL_TO" validate:"required_with=SmtpHost,omitempty,required_without=To"` SmtpHost string `yaml:"host" env:"EMAIL_HOST" validate:"omitempty,required"` SmtpPort int `yaml:"port" env:"EMAIL_PORT" validate:"omitempty,required"` SmtpUsername string `yaml:"user" env:"EMAIL_USER" validate:"required_with=SmtpHost,omitempty,required_without=SmtpUsernameFile"` SmtpUsernameFile string `yaml:"user_file" env:"EMAIL_USER_FILE" validate:"required_with=SmtpHost,omitempty,required_without=smtpUsername"` SmtpPassword string `yaml:"password" env:"EMAIL_PASSWORD" validate:"required_with=SmtpHost,omitempty,required_without=SmtpPasswordFile"` SmtpPasswordFile string `yaml:"password_file" env:"EMAIL_PASSWORD_FILE" validate:"required_with=SmtpHost,omitempty,required_without=SmtpPassword"` }
func (*EmailConfig) GetFrom ¶ added in v1.18.0
func (conf *EmailConfig) GetFrom() (string, error)
func (*EmailConfig) GetPassword ¶ added in v1.18.0
func (conf *EmailConfig) GetPassword() (string, error)
func (*EmailConfig) GetTo ¶ added in v1.18.0
func (conf *EmailConfig) GetTo() ([]string, error)
func (*EmailConfig) GetUsername ¶ added in v1.18.0
func (conf *EmailConfig) GetUsername() (string, error)
func (*EmailConfig) IsConfigured ¶ added in v1.18.0
func (conf *EmailConfig) IsConfigured() bool
func (*EmailConfig) Validate ¶ added in v1.11.0
func (conf *EmailConfig) Validate() error
type HttpConfig ¶ added in v1.18.0
type MqttConfig ¶
type MqttConfig struct { Brokers []string `yaml:"brokers" env:"BROKERS" envSeparator:";" validate:"broker"` ClientId string `yaml:"client_id" env:"CLIENT_ID" validate:"required_with=Brokers ''"` CaCertFile string `yaml:"tls_ca_cert" env:"TLS_CA" validate:"omitempty,file"` ClientCertFile string `yaml:"tls_client_cert" env:"TLS_CERT" validate:"omitempty,required_unless=ClientKeyFile '',file"` ClientKeyFile string `yaml:"tls_client_key" env:"TLS_KEY" validate:"omitempty,required_unless=ClientCertFile '',file"` TlsInsecure bool `yaml:"tls_insecure" env:"TLS_INSECURE"` }
func (*MqttConfig) TlsConfig ¶ added in v1.6.0
func (conf *MqttConfig) TlsConfig() *tls.Config
func (*MqttConfig) UsesTlsClientCerts ¶ added in v1.12.1
func (conf *MqttConfig) UsesTlsClientCerts() bool
type SqsConfig ¶ added in v1.19.0
type SqsConfig struct { SqsQueue string `yaml:"sqs_queue" env:"SQS_QUEUE"` Region string `yaml:"region" env:"SQS_REGION"` }
func DefaultSqsConfig ¶ added in v1.19.0
func DefaultSqsConfig() SqsConfig
type VaultAuthStrategy ¶ added in v1.14.0
type VaultAuthStrategy string
var ( VaultAuthStrategyToken VaultAuthStrategy = "token" VaultAuthStrategyApprole VaultAuthStrategy = "approle" VaultAuthStrategyKubernetes VaultAuthStrategy = "kubernetes" )
type VaultConfig ¶
type VaultConfig struct { VaultAddr string `yaml:"vault_addr,omitempty" env:"VAULT_ADDR" validate:"required_unless=AuthStrategy ''"` AuthStrategy VaultAuthStrategy `yaml:"vault_auth_strategy" env:"VAULT_AUTH_STRATEGY" validate:"omitempty,oneof=token approle kubernetes"` AwsRoleName string `yaml:"vault_aws_role_name,omitempty" env:"VAULT_AWS_ROLE_NAME"` AwsMountPath string `yaml:"vault_aws_mount_path,omitempty" env:"VAULT_AWS_MOUNT"` AppRoleId string `yaml:"vault_app_role_id,omitempty" env:"VAULT_APPROLE_ROLE_ID"` AppRoleSecretId string `yaml:"vault_app_role_secret,omitempty" env:"VAULT_APPROLE_SECRET_ID"` VaultToken string `yaml:"vault_token,omitempty" env:"VAULT_TOKEN"` }
func GetDefaultVaultConfig ¶
func GetDefaultVaultConfig() VaultConfig
func (*VaultConfig) UseVaultCredentialsProvider ¶ added in v1.14.0
func (c *VaultConfig) UseVaultCredentialsProvider() bool
Click to show internal directories.
Click to hide internal directories.