odata

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EdmString         = "Edm.String"
	EdmBoolean        = "Edm.Boolean"
	EdmSingle         = "Edm.Single"
	EdmDouble         = "Edm.Double"
	EdmDecimal        = "Edm.Decimal"
	EdmSByte          = "Edm.SByte"
	EdmByte           = "Edm.Byte"
	EdmInt16          = "Edm.Int16"
	EdmInt32          = "Edm.Int32"
	EdmInt64          = "Edm.Int64"
	EdmDateTimeOffset = "Edm.DateTimeOffset"
	EdmGuid           = "Edm.Guid"
	EdmTime           = "Edm.Time"
	EdmDate           = "Edm.Date"

	Metadata = "$metadata"
	Filter   = "$filter"
	Select   = "$select"
)

Variables

This section is empty.

Functions

func MapValue

func MapValue(value interface{}, propertyType string) interface{}

MapValue maps OData values to Grafana (Go) values

func ToArray

func ToArray(propertyType string) interface{}

ToArray maps OData property types to Grafana Field type

Types

type DataServices

type DataServices struct {
	XMLName xml.Name  `xml:"DataServices"`
	Schemas []*Schema `xml:"Schema"`
}

type Edmx

type Edmx struct {
	XMLName      xml.Name        `xml:"Edmx"`
	Version      string          `xml:"Version,attr"`
	XmlNs        string          `xml:"edmx,attr"`
	DataServices []*DataServices `xml:"DataServices"`
}

type EntityContainer

type EntityContainer struct {
	XMLName   xml.Name     `xml:"EntityContainer"`
	Name      string       `xml:"Name,attr"`
	EntitySet []*EntitySet `xml:"EntitySet"`
}

type EntitySet

type EntitySet struct {
	XMLName    xml.Name `xml:"EntitySet"`
	Name       string   `xml:"Name,attr"`
	EntityType string   `xml:"EntityType,attr"`
}

type EntityType

type EntityType struct {
	XMLName    xml.Name    `xml:"EntityType"`
	Name       string      `xml:"Name,attr"`
	Key        []*Key      `xml:"Key"`
	Properties []*Property `xml:"Property"`
}

type Key

type Key struct {
	XMLName     xml.Name       `xml:"Key"`
	PropertyRef []*PropertyRef `xml:"PropertyRef"`
}

type Property

type Property struct {
	XMLName  xml.Name `xml:"Property"`
	Name     string   `xml:"Name,attr"`
	Type     string   `xml:"Type,attr"`
	Nullable string   `xml:"Nullable,attr"`
}

type PropertyRef

type PropertyRef struct {
	XMLName xml.Name `xml:"PropertyRef"`
	Name    string   `xml:"Name,attr"`
}

type Response

type Response struct {
	Value []map[string]interface{} `json:"value"`
}

type Schema

type Schema struct {
	XMLName          xml.Name           `xml:"Schema"`
	Namespace        string             `xml:"Namespace,attr"`
	XmlNs            string             `xml:"xmlns,attr"`
	EntityTypes      []*EntityType      `xml:"EntityType"`
	EntityContainers []*EntityContainer `xml:"EntityContainer"`
}

Jump to

Keyboard shortcuts

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