conf

package
v0.0.0-...-e72100f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Host string `env:"APP_HOST, default=localhost"`
	Port string `env:"APP_PORT, default=8080"`
	Log  struct {
		Level string `env:"APP_LOG_LEVEL, default=warn"`
	}
}

type BasicAuth

type BasicAuth struct {
	Username string `env:"BASIC_AUTH_USERNAME"`
	Password string `env:"BASIC_AUTH_PASSWORD"`
}

type Configuration

type Configuration struct {
	App        App
	AuthType   string `env:"AUTH_TYPE, default=no_auth"`
	BasicAuth  BasicAuth
	Db         Db
	Connect    Connect
	Kafka      Kafka
	Connectors []Connector
}
var Config *Configuration

func New

func New(location string, fileName string) (*Configuration, error)

type Connect

type Connect struct {
	Url string
}

type Connector

type Connector struct {
	ID             int
	Name           string
	TableName      string `mapstructure:"table-name"`
	Topic          string
	Type           string
	KeepSchema     bool `mapstructure:"keep-schema"`
	KeepTombstones bool `mapstructure:"keep-tombstones"`
}

type Db

type Db struct {
	Host     string `env:"DB_HOST, required=true"`
	Port     string `env:"DB_PORT, required=true"`
	Name     string `env:"DB_NAME, required=true"`
	Username string `env:"DB_USERNAME, required=true"`
	Password string `env:"DB_PASSWORD, required=true"`
}

type Kafka

type Kafka struct {
	BootstrapServers string `mapstructure:"bootstrap-servers"`
}

Jump to

Keyboard shortcuts

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