server

package
v0.0.0-...-3e979a1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(dbName string) error

func StreamLogger

func StreamLogger(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

StreamLogger implements the StreamServerInterceptor interface. This function is used to log information like the IP address of the clients.

func UnaryLogger

func UnaryLogger(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

UnaryLogger implements the UnaryServerInterceptor interface. This function is used to log information like the IP address of the clients.

Types

type EnergyDemandHourly

type EnergyDemandHourly struct {
	Id               string `json:"id"`
	Date             string `json:"date"`
	Year             string `json:"year"`
	Month            string `json:"month"`
	Day              string `json:"day"`
	Hour             string `json:"hour"`
	Minutes          string `json:"minutes"`
	SourceId         string `json:"sourceid"`
	ChannelId        string `json:"channelid"`
	Unit             string `json:"unit"`
	TotalDemand      string `json:"totaldemand"`
	DeltaValue       string `json:"delta"`
	SourceTag        string `json:"sourcetag"`
	ChannelTag       string `json:"channeltag"`
	Label            string `json:"label"`
	Name             string `json:"name"`
	Height           string `json:"height"`
	Area             string `json:"area"`
	WindSpeed        string `json:"windspeed"`
	Temperature      string `json:"temperature"`
	SolarRad         string `json:"solarrad"`
	ElectricityPrice string `json:"electricityPrice"`
	Supply           string `json:"supply"`
	Renewables       string `json:"renewables"`
}

type EnergyUser

type EnergyUser struct {
	Time        string `json:"time"`
	Label       string `json:"label"`
	Name        string `json:"name"`
	SourceId    string `json:"sourceid"`
	TotalDemand string `json:"totaldemand"`
	Lighting    string `json:"lightning"`
	HVAC        string `json:"hvac"`
	Appliances  string `json:"appliances"`
	Lab         string `json:"lab"`
	PV          string `json:"PV"`
	Unit        string `json:"unit"`
}

Jump to

Keyboard shortcuts

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