config

package
v0.0.0-...-a57e244 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 8 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 {
	Debug     bool       `yaml:"debug"`
	Addr      string     `yaml:"addr"`
	Providers []Provider `yaml:"providers"`
}

func LoadConfig

func LoadConfig(configs ...string) (*Config, error)

type Provider

type Provider struct {
	Kind    ProviderKind `yaml:"kind"`
	Route   string       `yaml:"route"`
	Contact contact.Config
	Korona  korona.Config
}

func (*Provider) NewProvider

func (p *Provider) NewProvider() (provider.Provider, error)

type ProviderKind

type ProviderKind uint8
const (
	ProviderKindNone ProviderKind = iota
	ProviderKindContact
	ProviderKindKorona
)

func (ProviderKind) MarshalJSON

func (k ProviderKind) MarshalJSON() ([]byte, error)

func (ProviderKind) MarshalYAML

func (k ProviderKind) MarshalYAML() (interface{}, error)

func (ProviderKind) String

func (k ProviderKind) String() string

func (*ProviderKind) UnmarshalJSON

func (k *ProviderKind) UnmarshalJSON(in []byte) error

func (*ProviderKind) UnmarshalText

func (k *ProviderKind) UnmarshalText(v []byte) error

func (*ProviderKind) UnmarshalYAML

func (k *ProviderKind) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

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