Documentation ¶
Index ¶
- Variables
- func ToLegacyResult(input *pb.GetTriplesResponse) map[string][]*model.Triple
- func ToObsCollection(token string, jsonRaw []byte) (interface{}, error)
- func ToObsSeries(token string, jsonRaw []byte) (interface{}, error)
- func ToObsSeriesPb(token string, jsonRaw []byte) (interface{}, error)
- func ToTriples(dcid string, jsonRaw []byte) (interface{}, error)
- type UnitConversion
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.
func ToObsCollection ¶
ToObsCollection converts ChartStore to pb.ObsCollection
func ToObsSeries ¶
ToObsSeries converts ChartStore to ObsSeries
func ToObsSeriesPb ¶
ToObsSeriesPb converts ChartStore to pb.ObsTimeSerie
Types ¶
type UnitConversion ¶
UnitConversion represents conversion sepc for units.
Click to show internal directories.
Click to hide internal directories.