service

package
v0.0.0-...-25e8c23 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *Config) (*api, error)

Types

type Config

type Config struct {
	DatabaseBackend  string `json:"database_backend"`
	DatabaseUser     string `json:"database_user"`
	DatabasePassword string `json:"database_password"`
	DatabaseName     string `json:"database_name"`

	MqttHost string `json:"mqtt_host"`
}

func LoadConfigFromPath

func LoadConfigFromPath(path string) (*Config, error)

func (Config) Validate

func (c Config) Validate() error

type HealthzModel

type HealthzModel struct {
	IsHealthy    bool   `json:"is_healthy"`
	ErrorMessage string `json:"error_message"`
}

type JsonError

type JsonError struct {
	Code         int    `json:"code"`
	ErrorMessage string `json:"error_message"`
}

type LedDeviceModel

type LedDeviceModel struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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