config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(cfg *Config, dest string) error

Write attempts to write the config options to the file at the give dest.

Types

type AwsSesServiceConfig

type AwsSesServiceConfig struct {
	UseSharedConfig bool   `yaml:"useSharedConfig,omitempty"`
	Region          string `yaml:"region,omitempty"`
	Profile         string `yaml:"profile,omitempty"`
}

type Config

type Config struct {
	Service ServiceConfig `yaml:"service,omitempty"`
	Message MessageConfig `yaml:"message,omitempty"`
}

func Read

func Read(v *viper.Viper) (*Config, error)

Read attempts to read the config file in the current working directory. It falls back to sensible defaults if the entire config file or some config options are not provided.

type MessageConfig

type MessageConfig struct {
	Sender                   string   `yaml:"sender,omitempty"`
	ReplyToAddresses         []string `yaml:"replyToAddresses,omitempty"`
	DefaultDataCsvFile       string   `yaml:"defaultDataCsvFile,omitempty"`
	RecipientDataCsvFile     string   `yaml:"recipientDataCsvFile,omitempty"`
	RecipientEmailColumnName string   `yaml:"recipientEmailColumnName,omitempty"`
	MinifyHtml               bool     `yaml:"minifyHtml,omitempty"`
}

type ServiceConfig

type ServiceConfig struct {
	AwsSes    *AwsSesServiceConfig `yaml:"awsSes,omitempty"`
	Smtp      *SmtpServiceConfig   `yaml:"smtp,omitempty"`
	RateLimit int                  `yaml:"rateLimit,omitempty"`
	Retries   int                  `yaml:"retries,omitempty"`
}

type SmtpServiceConfig added in v0.3.0

type SmtpServiceConfig struct {
	Host       string `yaml:"host,omitempty"`
	Port       int    `yaml:"port,omitempty"`
	Username   string `yaml:"username,omitempty"`
	Password   string `yaml:"password,omitempty"`
	Encryption string `yaml:"encryption,omitempty"`
}

Jump to

Keyboard shortcuts

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