schemas

package
v0.0.0-...-cb7d559 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDocument

func GetDocument(documentURL string, resolveRefs bool) (map[string]interface{}, error)

func GetEventTimeSeriesData

func GetEventTimeSeriesData(value interface{}, serviceSchemaUri, event string) ([]model.TimeSeriesDatapoint, error)

* GetEventTimeSeriesData converts an event payload to 0..n time series data points. * NOTE: The payload must already have been validated. No validation is done here. * NOTE: This accepts the json payload. So either a simple type or map[string]interface{} * * @param value {interface{}} The payload of the event. Can be null if there is no payload * @param eventSchemaUri {string} The URI of the schema defining the event (usually ends with #/events/{name}) * @returns {Array} An array of records that need to be saved to a time series db

func GetSchema

func GetSchema(documentURL string) (*gojsonschema.JsonSchemaDocument, error)

func GetServiceMethods

func GetServiceMethods(service string) ([]string, error)

func Validate

func Validate(schema string, obj interface{}) (*string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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