config

package
v0.0.0-...-c5ff3dd Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 4 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 {
	// Application is the model of application configs.
	Application struct {
		Name      string `yaml:"name"`
		LogLevel  string `yaml:"logLevel"`
		LogPretty bool   `yaml:"logPretty"`
	} `yaml:"application"`

	// HTTPServer is the model of the HTTP Server configs.
	HTTPServer struct {
		// Addr is the address of the HTTP server.
		Addr string `yaml:"addr"`
	} `yaml:"httpServer"`

	RHSMService RHSMService `yaml:"rhsmService"`

	SourcesService SourcesService `yaml:"sourcesService"`

	Kafka KafkaConfig `yaml:"kafka"`
}

Config represents the configs model.

func Load

func Load() *Config

Load loads and returns the config value.

func LoadMock

func LoadMock() *Config

LoadMock provides a mock instance of the config for testing purposes.

type KafkaConfig

type KafkaConfig struct {
	BootstrapServers     string           `yaml:"server"`
	SourceEventTopic     string           `yaml:"eventTopic"`
	SourceStatusTopic    string           `yaml:"statusTopic"`
	SourceEventConsumer  *kafka.ConfigMap `yaml:"consumer"`
	SourceStatusProducer *kafka.ConfigMap `yaml:"producer"`
}

type RHSMService

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

type SourcesService

type SourcesService struct {
	URL string `yaml:"url"`
	PSK string `yaml:"psk"`
}

Jump to

Keyboard shortcuts

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