config

package
v0.0.0-...-1f4d271 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Using envfile and not YAML due to https://github.com/spf13/viper/issues/1029 so can't remove using . in environment variables which DigitalOcean doesn't support. The config methods below don't use viper.UnmarshalKey as it doesn't merge in environment variables due to https://github.com/spf13/viper/issues/1012

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	// contains filtered or unexported fields
}

func NewAppConfig

func NewAppConfig() AppConfig

func (AppConfig) GetLogConfig

func (c AppConfig) GetLogConfig() LogConfig

func (AppConfig) GetNotifierConfig

func (c AppConfig) GetNotifierConfig() NotifierConfig

func (AppConfig) GetRodConfig

func (c AppConfig) GetRodConfig() RodConfig

func (AppConfig) GetSchedulerConfig

func (c AppConfig) GetSchedulerConfig() SchedulerConfig

func (AppConfig) GetTwilioConfig

func (c AppConfig) GetTwilioConfig() TwilioConfig

type Config

type Config interface {
	GetLogConfig() LogConfig
	GetNotifierConfig() NotifierConfig
	GetRodConfig() RodConfig
	GetSchedulerConfig() SchedulerConfig
	GetTwilioConfig() TwilioConfig
}

type LogConfig

type LogConfig struct {
	Development bool
}

type NotifierConfig

type NotifierConfig struct {
	Enabled bool
}

type RodConfig

type RodConfig struct {
	DevTools     bool
	Headless     bool
	PagePoolSize int
	SlowMotion   bool
	Trace        bool
}

type SchedulerConfig

type SchedulerConfig struct {
	Interval uint64
}

type TwilioConfig

type TwilioConfig struct {
	URL        string
	AccountSid string
	AuthToken  string
	NumberTo   string
	NumberFrom string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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