convert

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnitMapping = map[string]*UnitConversion{
	"GigawattHour": {
		Unit:    "KilowattHour",
		Scaling: 1000000,
	},
}

UnitMapping maps unit schemas with scaling factor.

Functions

func ToLegacyResult added in v1.33.0

func ToLegacyResult(input *pb.GetTriplesResponse) map[string][]*model.Triple

ToLegacyResult converts pb.GetTriplesResponse to legacy golang struct to make the API response backward compatible.

Types

type UnitConversion

type UnitConversion struct {
	Unit    string
	Scaling float64
}

UnitConversion represents conversion sepc for units.

Jump to

Keyboard shortcuts

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