Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiConfig ¶
type ApiConfig struct { Smtp struct { Host string `envconfig:"API_SMTP_HOST" required:"true"` Port uint16 `envconfig:"API_SMTP_PORT" default:"465" required:"true"` Data struct { Limit uint32 `envconfig:"API_SMTP_DATA_LIMIT" default:"1048576" required:"true"` TruncUrlQueries bool `envconfig:"API_SMTP_DATA_TRUNC_URL_QUERIES" default:"false"` } Recipients struct { Publish []string `envconfig:"API_SMTP_RECIPIENTS_PUBLISH" required:"true"` Internal []string `envconfig:"API_SMTP_RECIPIENTS_INTERNAL" required:"true"` Limit uint16 `envconfig:"API_SMTP_RECIPIENTS_LIMIT" default:"100" required:"true"` } Timeout struct { Read time.Duration `envconfig:"API_SMTP_TIMEOUT_READ" default:"1m" required:"true"` Write time.Duration `envconfig:"API_SMTP_TIMEOUT_WRITE" default:"1m" required:"true"` } Tls struct { CertPath string `envconfig:"API_SMTP_TLS_CERT_PATH" default:"/etc/smtp/tls/tls.crt" required:"true"` KeyPath string `envconfig:"API_SMTP_TLS_KEY_PATH" default:"/etc/smtp/tls/tls.key" required:"true"` VersionMin uint16 `envconfig:"API_SMTP_TLS_VERSION_MIN" default:"769" required:"true"` ClientAuthType tls.ClientAuthType `envconfig:"API_SMTP_TLS_CLIENT_AUTH_TYPE" default:"4" required:"true"` } } Group string `envconfig:"API_GROUP" default:"default" required:"true"` EventType EventTypeConfig Writer struct { Backoff time.Duration `envconfig:"API_WRITER_BACKOFF" default:"10s" required:"true"` Internal WriterInternalConfig Uri string `envconfig:"API_WRITER_URI" default:"http://pub:8080/v1" required:"true"` } Token struct { Internal string `envconfig:"API_TOKEN_INTERNAL" required:"true"` } }
type Config ¶
type Config struct { Api ApiConfig Log struct { Level int `envconfig:"LOG_LEVEL" default:"-4" required:"true"` } }
func NewConfigFromEnv ¶
type EventTypeConfig ¶
type EventTypeConfig struct {
Self string `envconfig:"API_EVENT_TYPE_SELF" required:"true" default:"com_awakari_email_v1"`
}
type ReaderConfig ¶
type ReaderConfig struct {
UriEventBase string `envconfig:"API_READER_URI_EVT_BASE" default:"https://awakari.com/pub-msg.html?id=" required:"true"`
}
type WriterCacheConfig ¶
type WriterInternalConfig ¶
Click to show internal directories.
Click to hide internal directories.