orion

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Split added in v0.2.9

func Split(entities []Entity) ([]fiware.EntityType, []fiware.Entity)

Split a merged Entity into fiware.entityType and fiware.Entity

func SubsMap added in v0.4.4

func SubsMap(subs []fiware.Subscription) map[string]fiware.Subscription

Turns a list of subscriptions into a map indexed by description

Types

type Entity added in v0.2.6

type Entity map[string]json.RawMessage

Entity representa una entidad tal como la ve la API

func Merge added in v0.2.6

func Merge(types []fiware.EntityType, values []fiware.Entity) []Entity

Merge fiware EntityType with Entity to build full Entity

func (Entity) Attrs added in v0.2.9

func (e Entity) Attrs() map[string]EntityAttr

func (Entity) ID added in v0.2.6

func (e Entity) ID() string

func (Entity) Type added in v0.2.6

func (e Entity) Type() string

type EntityAttr added in v0.2.6

type EntityAttr struct {
	Type     string          `json:"type"`
	Value    json.RawMessage `json:"value"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type Orion

type Orion struct {
	URL                *url.URL
	AllowUnknownFields bool
}

Orion manages connection to the Context Broker

func New

func New(orionURL string) (*Orion, error)

New Orion instance

func (*Orion) DeleteEntities added in v0.2.2

func (o *Orion) DeleteEntities(client keystone.HTTPClient, headers http.Header, ents []fiware.Entity, batchSize int) error

DeleteEntities deletes a list of entities from Orion

func (*Orion) DeleteSuscriptions

func (o *Orion) DeleteSuscriptions(client keystone.HTTPClient, headers http.Header, subs []fiware.Subscription, useDescription bool) error

DeleteSuscriptions deletes a list of suscriptions from Orion

func (*Orion) Entities added in v0.2.9

func (o *Orion) Entities(client keystone.HTTPClient, headers http.Header, idPattern string, entityType string, simpleQuery string, maximum int) ([]fiware.EntityType, []fiware.Entity, error)

Entities reads the list of entities from the Context Broker

func (*Orion) PostSuscriptions

func (o *Orion) PostSuscriptions(client keystone.HTTPClient, headers http.Header, subs []fiware.Subscription, ep map[string]string, useDescription bool) error

PostSuscriptions posts a list of suscriptions to orion

func (*Orion) Registrations added in v0.3.5

func (o *Orion) Registrations(client keystone.HTTPClient, headers http.Header) ([]fiware.Registration, error)

Suscriptions reads the list of suscriptions from the Context Broker

func (*Orion) Subscriptions added in v0.3.7

func (o *Orion) Subscriptions(client keystone.HTTPClient, headers http.Header, notifEndpoints map[string]string) ([]fiware.Subscription, error)

Subscriptions reads the list of suscriptions from the Context Broker

func (*Orion) UpdateEntities added in v0.2.6

func (o *Orion) UpdateEntities(client keystone.HTTPClient, headers http.Header, ents []Entity, batchSize int, overrideMetadata bool) error

UpdateEntities updates a list of entities

Jump to

Keyboard shortcuts

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