config

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildTime string
View Source
var GitRevision string

Functions

This section is empty.

Types

type BackupTaskConfig

type BackupTaskConfig struct {
	Cron string
}

type BuildInfo

type BuildInfo struct {
	Version string `json:"version"`
}

func GetBuildInfo

func GetBuildInfo() BuildInfo

type Config

type Config struct {
	Port uint16

	Meters string
	Label  string
	Email  MailConfig
	Task   TaskConfig
}

func New

func New() (Config, error)

type MailConfig

type MailConfig struct {
	Recipient    string
	Sender       string
	SmtpHost     string `mapstructure:"smtp_host"`
	SmtpPort     uint16 `mapstructure:"smtp_port"`
	SmtpUser     string `mapstructure:"smtp_user"`
	SmtpPassword string `mapstructure:"smtp_password"`
}

type NotificationTaskConfig

type NotificationTaskConfig struct {
	Cron       string
	Days       uint16
	Url        string
	MeterNames []string `mapstructure:"meter_names"`
}

type TaskConfig

type TaskConfig struct {
	Backup       BackupTaskConfig
	Notification NotificationTaskConfig
}

Jump to

Keyboard shortcuts

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