Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ChangeChannel = make(chan bool)
)
Functions ¶
func LoadConfiguration ¶
func LoadConfiguration(options *ConfigurationOptions) error
LoadConfiguration loads the configuration from the given options.
Types ¶
type Configuration ¶
type Configuration struct { // Credentials is the Cloudflare Credentials configuration. Credentials *cloudflare.Configuration `json:"credentials" yaml:"credentials" xml:"credentials" toml:"credentials" mapstructure:"credentials"` // Records is the Cloudflare Records configuration. Records []*records.Configuration `json:"records" yaml:"records" xml:"records" toml:"records" mapstructure:"records"` // Watcher is the Watcher configuration. Watcher *watcher.Configuration `json:"watcher" yaml:"watcher" xml:"watcher" toml:"watcher" mapstructure:"watcher"` // LogLevel is the log level. LogLevel string `json:"log_level" yaml:"log_level" xml:"log_level" toml:"log_level" mapstructure:"log_level" env:"GOFLARESYNC_LOG_LEVEL"` }
Configuration is the definition of the configuration.
func GetConfiguration ¶
func GetConfiguration() *Configuration
GetConfiguration returns the configuration for the application.
func (*Configuration) GetCredentials ¶
func (configuration *Configuration) GetCredentials() *cloudflare.Configuration
GetCredentials returns the Cloudflare Credentials configuration.
func (*Configuration) GetLogLevel ¶
func (configuration *Configuration) GetLogLevel() log.Level
GetLogLevel returns the log level.
func (*Configuration) GetRecords ¶
func (configuration *Configuration) GetRecords() []*records.Configuration
GetRecords returns the Cloudflare Records configuration.
func (*Configuration) GetWatcher ¶
func (configuration *Configuration) GetWatcher() *watcher.Configuration
GetWatcher returns the Watcher configuration.
type ConfigurationOptions ¶
type ConfigurationOptions struct { // Name is the name of the configuration file. Name string // Extension is the extension of the configuration file. Extension string // Path is the path to the configuration file. Path string }
ConfigurationOptions is the options for the configuration.
func NewConfiguration ¶
func NewConfiguration(name, extension, path string) *ConfigurationOptions
NewConfiguration creates a new configuration options.
func (*ConfigurationOptions) GetExtension ¶
func (options *ConfigurationOptions) GetExtension() string
GetExtension returns the extension of the configuration file.
func (*ConfigurationOptions) GetName ¶
func (options *ConfigurationOptions) GetName() string
GetName returns the name of the configuration file.
func (*ConfigurationOptions) GetPath ¶
func (options *ConfigurationOptions) GetPath() string
GetPath returns the path to the configuration file.
Click to show internal directories.
Click to hide internal directories.