Documentation ¶
Index ¶
- Constants
- func Equals(a, b *pb.DataWithCategory) bool
- func GetCategory(value int, dataType string) int
- func LoadTLS() (credentials.TransportCredentials, error)
- func MapAir(value int) int
- func MapCO2(value int) int
- func MapValue(x float64, inMin float64, inMax float64, outMin float64, outMax float64) int
- func RateLimit(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (interface{}, error)
Constants ¶
View Source
const ( // CarbonMonoxide constant. CarbonMonoxide = "CARBON_MONOXIDE" // AirQuality constant. AirQuality = "AIR_QUALITY" // Raindrops constant. Raindrops = "RAINDROPS" // SoilMoisture constant. SoilMoisture = "SOIL_MOISTURE" // EnvTestFilePath path for the file 'test.env'. EnvTestFilePath = "../env/test.env" )
Variables ¶
This section is empty.
Functions ¶
func Equals ¶
func Equals(a, b *pb.DataWithCategory) bool
Equals compares two pb.DataWithCategory structures.
func GetCategory ¶
GetCategory returns category for a specific dataType.
func LoadTLS ¶
func LoadTLS() (credentials.TransportCredentials, error)
LoadTLS loads TLS certificate.
func RateLimit ¶
func RateLimit(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
RateLimit limit request rate - 10 request per second.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.