config

package
v1.1.23 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWithPath

func NewWithPath(path string) *multiconfig.DefaultLoader

NewWithPath returns a new instance of Loader to read from the given configuration file using our config options

Types

type Courier

type Courier struct {
	// Backend is the backend that will be used by courier (currently only rapidpro is supported)
	Backend string `default:"rapidpro"`

	// SentryDSN is the DSN used for logging errors to Sentry
	SentryDSN string `default:""`

	// Domain is the domain courier is exposed on
	Domain string `default:"localhost"`

	// Port is the port courier will listen on
	Port int `default:"8080"`

	// DB is a URL describing how to connect to our database
	DB string `default:"postgres://courier@localhost/courier?sslmode=disable"`

	// Redis is a URL describing how to connect to Redis
	Redis string `default:"redis://localhost:6379/0"`

	// SpoolDir is the local directory where courier will write statuses or msgs that need to be retried (needs to be writable)
	SpoolDir string `default:"/var/spool/courier"`

	// S3Region is the S3 region we will write attachments to
	S3Region string `default:"us-east-1"`

	// S3MediaBucket is the S3 bucket we will write attachments to
	S3MediaBucket string `default:"courier-media"`

	// S3MediaPrefix is the prefix that will be added to attachment filenames
	S3MediaPrefix string `default:"/media/"`

	// AWSAccessKeyID is the access key id to use when authenticating S3
	AWSAccessKeyID string `default:"missing_aws_access_key_id"`

	// AWSAccessKeyID is the secret access key id to use when authenticating S3
	AWSSecretAccessKey string `default:"missing_aws_secret_access_key"`

	// MaxWorkers it the maximum number of go routines that will be used for sending (set to 0 to disable sending)
	MaxWorkers int `default:"32"`

	// LibratoUsername is the username that will be used to authenticate to Librato
	LibratoUsername string `default:""`

	// LibratoToken is the token that will be used to authenticate to Librato
	LibratoToken string `default:""`

	// StatusUsername is the username that is needed to authenticate against the /status endpoint
	StatusUsername string `default:""`

	// StatusPassword is the password that is needed to authenticate against the /status endpoint
	StatusPassword string `default:""`

	// LogLevel controls the logging level courier uses
	LogLevel string `default:"error"`

	// IgnoreDeliveryReports controls whether we ignore delivered status reports (errors will still be handled)
	IgnoreDeliveryReports bool `default:"false"`

	// IncludeChannels is the list of channels to enable, empty means include all
	IncludeChannels []string

	// ExcludeChannels is the list of channels to exclude, empty means exclude none
	ExcludeChannels []string

	// Version is the version that will be sent in headers
	Version string `default:"Dev"`
}

Courier is our top level configuration object

func NewTest

func NewTest() *Courier

NewTest returns a new instance of our config initialized just from our defaults as defined above

Jump to

Keyboard shortcuts

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