config

package
v0.0.0-...-f9511c6 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Providers map[string]Provider `yaml:"providers" validate:"required,dive"`
	Inboxes   []Inbox             `yaml:"inboxes"   validate:"required,dive"`
}

func Load

func Load(path string) (*Config, error)

type Inbox

type Inbox struct {
	Host     string `yaml:"host"     validate:"required"`
	Port     int    `yaml:"port"     validate:"required"`
	TLS      bool   `yaml:"tls"      validate:"omitempty"`
	Username string `yaml:"username" validate:"required"`
	Password string `yaml:"password" validate:"required"`
	Provider string `yaml:"provider" validate:"required"`
	Inbox    string `yaml:"inbox"    validate:"required"`
	Spam     string `yaml:"spam"     validate:"required"`
}

type Provider

type Provider struct {
	Type        string            `yaml:"type"        validate:"required,oneof=openai"`
	Credentials map[string]string `json:"credentials" validate:"required"`
}

Jump to

Keyboard shortcuts

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