models

package
v1.2.6-0...-daff01b Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 6 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 {
	Mongo struct {
		Addr string `yaml:"addr"`
		Port int    `yaml:"port"`
		User string `yaml:"user"`
		Pass string `yaml:"pass"`
	}

	Rest struct {
		Port int `yaml:"port"`
	}
	Weather struct {
		Key string  `yaml:"key"`
		Lat float64 `yaml:"lat"`
		Lon float64 `yaml:"lon"`
	}
}

type DockerContainerInfo

type DockerContainerInfo struct {
	Name    string `json:"name"`
	Repo    string `json:"repo"`
	Version string `json:"version"`
	Uptime  string `json:"uptime"`
	Status  string `json:"status"`
	Port    string `json:"port"`
}

func ToDockerContainerInfo

func ToDockerContainerInfo(container types.Container) DockerContainerInfo

type Route

type Route struct {
	Method string `json:"method"`
	Uri    string `json:"uri"`
}

type Routes

type Routes []Route

type SensorData

type SensorData struct {
	Device_id string             `json:"device_id"`
	Timestamp primitive.DateTime `json:"timestamp"`
	Temp      float32            `json:"temp"`
	Humi      float32            `json:"humi"`
}

func ToSensorData

func ToSensorData(data bson.M) SensorData

Jump to

Keyboard shortcuts

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