configuration

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 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   `json:"debug"`
	ApiPort string `json:"api_port"`

	SlackWebhookUrl string `json:"slack_webhook_url" config:"secret"`

	MailSmtpHost string `json:"mail_smtp_host"`
	MailSmtpPort string `json:"mail_smtp_port"`
	MailFrom     string `json:"mail_from" config:"secret"`
	MailPassword string `json:"mail_password" config:"secret"`

	//enables configuration of additional subscriptions without the need to change the config.json
	//ref pkg/tests/testdata/subscriptions
	SubscriptionFilesDir string `json:"subscription_files_dir"`

	Subscriptions []model.Subscription `json:"subscriptions"`
}

func Load

func Load(location string) (config Config, err error)

loads config from json in location and used environment variables (e.g KafkaUrl --> KAFKA_URL)

Jump to

Keyboard shortcuts

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