config

package
v0.0.0-...-0616b42 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address() string

func Load

func Load(configPath string) error

Types

type CacheConfig

type CacheConfig struct {
	URL      string `yaml:"url"`
	Password string `yaml:"password"`
}

func Cache

func Cache() *CacheConfig

type Config

type Config struct {
	Port          int                 `yaml:"port"`
	Email         EmailConfig         `yaml:"email"`
	Database      DatabaseConfig      `yaml:"database"`
	Cache         CacheConfig         `yaml:"cache"`
	MessageBroker MessageBrokerConfig `yaml:"messageBroker"`
	Tracing       TracingConfig       `yaml:"tracing"`
}

type DatabaseConfig

type DatabaseConfig struct {
	URL      string `yaml:"url"`
	Password string `yaml:"password"`
}

func Database

func Database() *DatabaseConfig

type EmailConfig

type EmailConfig struct {
	SMTPServer  string `yaml:"smtp_server"`
	SMTPPort    int    `yaml:"smtp_port"`
	SenderEmail string `yaml:"senderEmail"`
	AppPassword string `yaml:"appPassword"`
}

func Email

func Email() *EmailConfig

type JaegerConfig

type JaegerConfig struct {
	URL string `yaml:"url"`
}

type MessageBrokerConfig

type MessageBrokerConfig struct {
	BrokersUrl []string `yaml:"brokers"`
}

func MessageBroker

func MessageBroker() *MessageBrokerConfig

type TracingConfig

type TracingConfig struct {
	Enable bool         `yaml:"enable"`
	Jaeger JaegerConfig `yaml:"jaeger"`
}

func Tracing

func Tracing() *TracingConfig

Jump to

Keyboard shortcuts

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