config

package
v0.0.0-...-9d63270 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 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 {
	Climkit  ConfigClimkit
	Mqtt     ConfigMqtt
	Postgres ConfigPostgres
	Mode     Mode
	LogLevel string
}

func ReadConfig

func ReadConfig() (*Config, error)

FromEnv returns a Config from env variables

func (*Config) String

func (c *Config) String() string

type ConfigClimkit

type ConfigClimkit struct {
	ApiUrl   string
	Username string
	Password string
}

type ConfigMqtt

type ConfigMqtt struct {
	MqttUrl     string
	Username    string
	Password    string
	TopicPrefix string
	Retain      bool
}

type ConfigPostgres

type ConfigPostgres struct {
	Host     string
	Port     int
	Database string
	Username string
	Password string
	SslMode  string
}

type Mode

type Mode string
const (
	Mqtt     Mode = "mqtt"
	Postgres      = "postgres"
)

Jump to

Keyboard shortcuts

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