conf

package
v0.0.0-...-378a548 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Config{
	SmtpFile: "etc/smtp.json",
	NtfyFile: "etc/ntfy.json",
	Etcd: config.Etcd{
		Endpoints: []string{
			"127.0.0.1:2379",
		},
	},
	Log: config.Log{
		DisableTimestamp: false,
		Level:            "info",
		Format:           "json",
		MaxSize:          100,
		MaxDays:          180,
		MaxBackups:       90,
		Compress:         true,
	},
	Server: config.Server{
		Host: "0.0.0.0",
		Port: 5273,
	},
	Otel: config.Opentrace{
		Enable: true,
		DSN:    "otel-collector:4317",
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	SmtpFile string           `json:"smtp-file" toml:"smtp-file"`
	NtfyFile string           `json:"ntfy-file" toml:"ntfy-file"`
	Etcd     config.Etcd      `json:"etcd" toml:"etcd"`
	Log      config.Log       `json:"log" toml:"log"`
	Server   config.Server    `json:"server" toml:"server"`
	Otel     config.Opentrace `json:"otel" toml:"otel"`
}

func (*Config) LoadFile

func (c *Config) LoadFile(path string) error

func (*Config) String

func (c *Config) String() string

type NFTY

type NFTY struct {
	Scheme   string `json:"scheme"`
	Server   string `json:"server"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
}

func FindNTFY

func FindNTFY(path string) (*NFTY, error)

func (*NFTY) String

func (n *NFTY) String() string

type SMTP

type SMTP struct {
	Server   string `json:"server"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	Alias    string `json:"alias"`
}

func FindSMTP

func FindSMTP(path string) (*SMTP, error)

func (*SMTP) String

func (m *SMTP) String() string

Jump to

Keyboard shortcuts

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