Documentation ¶
Index ¶
- Variables
- func Distance(p1 *Point, p2 *Point) uint64
- type BrokerProfile
- type CSourceRegistrationRequest
- type CSourceRegistrationResponse
- type Circle
- type Conditions
- type ContextAttribute
- type ContextElement
- func (ce *ContextElement) CloneWithSelectedAttributes(selectedAttributes []string) *ContextElement
- func (ce *ContextElement) GetAttribute(name string) *ContextAttribute
- func (ce *ContextElement) GetMetadata(name string) *ContextMetadata
- func (ce *ContextElement) GetScope() OperationScope
- func (ce *ContextElement) IsEmpty() bool
- func (element *ContextElement) MarshalJSON() ([]byte, error)
- func (element *ContextElement) SetEntityID()
- type ContextElementOrion
- type ContextElementResponse
- type ContextMetadata
- type ContextObject
- type ContextRegistration
- type ContextRegistration1
- type ContextRegistrationAttribute
- type ContextRegistrationResponse
- type DiscoverContextAvailabilityRequest
- type DiscoverContextAvailabilityResponse
- type Endpoint
- type EntityId
- type EntityId1
- type EntityRegistration
- type Expression
- type FiwareData
- type GeoProperty
- type GeoQuery
- type Geometry
- type HTTPS
- type Http
- type LDContextElement
- type LDContextElementResponse
- type LDLocation
- type LDLocationValue
- type LDNotifyContextRequest
- type LDSubscriptionRequest
- type MySegment
- type NGSI10Client
- func (nc *NGSI10Client) AppendLDEntityOnRemote(elem map[string]interface{}, eid string) error
- func (nc *NGSI10Client) CreateLDEntityOnRemote(elem map[string]interface{}, link string) error
- func (nc *NGSI10Client) DeleteContext(eid *EntityId) error
- func (nc *NGSI10Client) GetEntity(id string) (*ContextObject, error)
- func (nc *NGSI10Client) InternalDeleteContext(eid *EntityId) error
- func (nc *NGSI10Client) InternalQueryContext(query *QueryContextRequest) ([]ContextElement, error)
- func (nc *NGSI10Client) InternalUpdateContext(elem *ContextElement) error
- func (nc *NGSI10Client) NotifyContext(elem *ContextElement) error
- func (nc *NGSI10Client) QueryContext(query *QueryContextRequest) ([]*ContextObject, error)
- func (nc *NGSI10Client) QueryForNGSILDEntity(eid string) int
- func (nc *NGSI10Client) QueryForNGSIV1Entity(eid string) int
- func (nc *NGSI10Client) SouthboundUpdateContext(elem *ContextElement, fs string, fsp string) error
- func (nc *NGSI10Client) SubscribeContext(sub *SubscribeContextRequest, requireReliability bool) (string, error)
- func (nc *NGSI10Client) SubscribeLdContext(sub *LDSubscriptionRequest, requireReliability bool) (string, error)
- func (nc *NGSI10Client) UnsubscribeContext(sid string) error
- func (nc *NGSI10Client) UpdateContext(elem *ContextElement) error
- func (nc *NGSI10Client) UpdateContextObject(ctxObj *ContextObject) error
- func (nc *NGSI10Client) UpdateLDEntityAttributeOnRemote(elem map[string]interface{}, eid string) (error, int)
- func (nc *NGSI10Client) UpdateLDEntityspecificAttributeOnRemote(elem map[string]interface{}, eid string, attribute string) (error, int)
- type NGSI9Client
- func (nc *NGSI9Client) DiscoverContextAvailability(discoverCtxAvailabilityReq *DiscoverContextAvailabilityRequest) ([]ContextRegistration, error)
- func (nc *NGSI9Client) DiscoveryNearbyIoTBroker(nearby NearBy) (string, error)
- func (nc *NGSI9Client) GetProviderURL(id string) (string, *EntityRegistration)
- func (nc *NGSI9Client) QuerySiteList(geoscope OperationScope) ([]SiteInfo, error)
- func (nc *NGSI9Client) RegisterContext(registerCtxReq *RegisterContextRequest) (string, error)
- func (nc *NGSI9Client) SendHeartBeat(brokerProfile *BrokerProfile) error
- func (nc *NGSI9Client) SubscribeContextAvailability(sub *SubscribeContextAvailabilityRequest) (string, error)
- func (nc *NGSI9Client) UnregisterEntity(eid string) error
- func (nc *NGSI9Client) UnsubscribeContextAvailability(sid string) error
- func (nc *NGSI9Client) UpdateLDContextAvailability(sub *SubscribeContextAvailabilityRequest, sid string) (string, error)
- type NGSIAgent
- type NGSIV2Client
- type NearBy
- type Notification
- type NotificationParams
- type NotifyCondition
- type NotifyConditionType
- type NotifyContextAvailabilityFunc
- type NotifyContextAvailabilityRequest
- type NotifyContextAvailabilityResponse
- type NotifyContextFunc
- type NotifyContextRequest
- type NotifyContextResponse
- type Notifyv2ContextAvailabilityRequest
- type Notifyv2ContextAvailabilityResponse
- type OperationScope
- type OrionContextAttribute
- type Point
- type Polygon
- type ProblemDetails
- type Property
- type ProvidedBy
- type QueryContextRequest
- type QueryContextResponse
- type RegisterContextRequest
- type RegisterContextRequest1
- type RegisterContextResponse
- type RegistrationInfo
- type Relationship
- type ResponseError
- type Restriction
- type Segment
- type SiteInfo
- type StatusCode
- type Subject
- type SubscribeContextAvailabilityRequest
- type SubscribeContextAvailabilityResponse
- type SubscribeContextRequest
- type SubscribeContextResponse
- type SubscribeError
- type SubscribeResponse
- type Subscriber
- type Subscribev2ContextAvailabilityRequest
- type Subscribev2ContextAvailabilityResponse
- type Subscribev2Response
- type SubscriptionError
- type SubscriptionRequest
- type SubscriptionResponse
- type TemporalQuery
- type TimeInterval
- type UnsubscribeContextAvailabilityRequest
- type UnsubscribeContextAvailabilityResponse
- type UnsubscribeContextRequest
- type UnsubscribeContextResponse
- type Unsubscribev2ContextAvailabilityRequest
- type Unsubscribev2ContextAvailabilityResponse
- type UpdateActionType
- type UpdateContextAvailabilitySubscriptionRequest
- type UpdateContextAvailabilitySubscriptionResponse
- type UpdateContextRequest
- type UpdateContextResponse
- type UpdateContextSubscriptionRequest
- type UpdateContextSubscriptionResponse
- type ValueObject
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type BrokerProfile ¶
type CSourceRegistrationRequest ¶
type CSourceRegistrationRequest struct { Id string `json:"id",omitempty` //URI Type string `json:"type",omitemtpy` Name string `json:"name",omitempty` Description string `json:"description",omitempty` Information []RegistrationInfo `json:"information",omitemtpy` ObservationInterval TimeInterval `json:"observationInterval",omitempty` ManagementInterval TimeInterval `json:"managementInterval",omitempty` Location string `json:"location",omitempty` ObservationSpace interface{} `json:"observationSpace,omitempty"` // Type = GeoJSON Geometry OperationSpace interface{} `json:"operationSpace,omitempty"` // Type = GeoJSON Geometry Expires string `json:expires,omitempty` Endpoint string `json:"endpoint",omitemtpy` //URI CreatedAt string `json:"createdAt",omitemtpy` ModifiedAt string `json:"modifiedAt",omitemtpy` }
type CSourceRegistrationResponse ¶
type CSourceRegistrationResponse struct { RegistrationID string `json: "registrationID",omitemtpy` ErrorCode StatusCode `json:"errorCode,omitempty",omitemtpy` }
type Conditions ¶
type Conditions struct { Attrs []string `json:"attrs"` Expression Expression `json:"expression,omitempty"` }
type ContextAttribute ¶
type ContextAttribute struct { Name string `json:"name"` Type string `json:"type,omitempty"` Value interface{} `json:"value"` Metadata []ContextMetadata `json:"metadata,omitempty"` }
func (*ContextAttribute) UnmarshalJSON ¶
func (pAttr *ContextAttribute) UnmarshalJSON(b []byte) error
type ContextElement ¶
type ContextElement struct { Entity EntityId `json:"entityId"` ID string `json:"id"` Type string `json:"type,omitempty"` IsPattern string `json:"isPattern"` Attributes []ContextAttribute `json:"attributes,omitempty"` Metadata []ContextMetadata `json:"domainMetadata,omitempty"` }
func Object2CtxElement ¶
func Object2CtxElement(ctxObj *ContextObject) *ContextElement
func (*ContextElement) CloneWithSelectedAttributes ¶
func (ce *ContextElement) CloneWithSelectedAttributes(selectedAttributes []string) *ContextElement
func (*ContextElement) GetAttribute ¶
func (ce *ContextElement) GetAttribute(name string) *ContextAttribute
func (*ContextElement) GetMetadata ¶
func (ce *ContextElement) GetMetadata(name string) *ContextMetadata
func (*ContextElement) GetScope ¶
func (ce *ContextElement) GetScope() OperationScope
func (*ContextElement) IsEmpty ¶
func (ce *ContextElement) IsEmpty() bool
func (*ContextElement) MarshalJSON ¶
func (element *ContextElement) MarshalJSON() ([]byte, error)
func (*ContextElement) SetEntityID ¶
func (element *ContextElement) SetEntityID()
the part to deal with NGSI v1 update supported by Orion Context Broker
type ContextElementOrion ¶
type ContextElementOrion struct { ID string `json:"id"` Type string `json:"type"` IsPattern string `json:"isPattern"` AttributeDomainName string `json:"attributeDomainName,omitempty"` Attributes []OrionContextAttribute `json:"attributes,omitempty"` Metadatas []ContextMetadata `json:"metadatas,omitempty"` }
type ContextElementResponse ¶
type ContextElementResponse struct { ContextElement ContextElement `json:"contextElement"` StatusCode StatusCode `json:"statusCode"` }
type ContextMetadata ¶
type ContextMetadata struct { Name string `json:"name"` Type string `json:"type,omitempty"` Value interface{} `json:"value"` }
func (*ContextMetadata) UnmarshalJSON ¶
func (metadata *ContextMetadata) UnmarshalJSON(b []byte) error
type ContextObject ¶
type ContextObject struct { Entity EntityId `json:"entityId"` Attributes map[string]ValueObject `json:"attributes,omitempty"` Metadata map[string]ValueObject `json:"metadata,omitempty"` AttributeDomainName string `json:"attributeDomainName,omitempty"` }
func CtxElement2Object ¶
func CtxElement2Object(ctxElem *ContextElement) *ContextObject
func (*ContextObject) IsEmpty ¶
func (ctxObj *ContextObject) IsEmpty() bool
type ContextRegistration ¶
type ContextRegistration struct { EntityIdList []EntityId `json:"entities,omitempty"` ContextRegistrationAttributes []ContextRegistrationAttribute `json:"attributes,omitempty"` Metadata []ContextMetadata `json:"contextMetadata,omitempty"` ProvidingApplication string `json:"providingApplication"` }
type ContextRegistration1 ¶
type ContextRegistration1 struct { EntityIdList []EntityId1 `json:"entities,omitempty"` ContextRegistrationAttributes []ContextRegistrationAttribute `json:"attributes,omitempty"` Metadata []ContextMetadata `json:"contextMetadata,omitempty"` ProvidingApplication string `json:"providingApplication"` }
type ContextRegistrationAttribute ¶
type ContextRegistrationAttribute struct { Name string `json:"name"` Type string `json:"type,omitempty"` IsDomain bool `json:"isDomain"` Metadata []ContextMetadata `json:"metadata,omitempty"` }
type ContextRegistrationResponse ¶
type ContextRegistrationResponse struct { ContextRegistration ContextRegistration `json:"contextRegistration,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type DiscoverContextAvailabilityRequest ¶
type DiscoverContextAvailabilityRequest struct { Entities []EntityId `json:"entities"` Attributes []string `json:"attributes,omitempty"` Restriction Restriction `json:"restriction,omitempty"` }
type DiscoverContextAvailabilityResponse ¶
type DiscoverContextAvailabilityResponse struct { ContextRegistrationResponses []ContextRegistrationResponse `json:"contextRegistrationResponses,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type EntityRegistration ¶
type EntityRegistration struct { ID string Type string AttributesList map[string]ContextRegistrationAttribute MetadataList map[string]ContextMetadata ProvidingApplication string }
func (*EntityRegistration) GetLocation ¶
func (registredEntity *EntityRegistration) GetLocation() Point
func (*EntityRegistration) IsMatched ¶
func (registredEntity *EntityRegistration) IsMatched(restrictions map[string]interface{}) bool
used by master to group the received input
func (*EntityRegistration) Update ¶
func (registredEntity *EntityRegistration) Update(newUpdates *EntityRegistration)
type Expression ¶
type Expression struct { Georel map[string]ValueObject `json:"georel,omitempty"` Geometry map[string]ValueObject `json:"geometry,omitempty"` Coords map[string]ValueObject `json:"coords,omitempty"` }
type FiwareData ¶
type GeoProperty ¶
type Geometry ¶
type Geometry struct { Type string `json:"type",omitemtpy` Coordinates interface{} `json:"coordinates",omitemtpy` }
type HTTPS ¶
type HTTPS struct { Enabled bool `json:"enabled"` Certificate string `json:"my_certificate"` Key string `json:"my_key"` CA string `json:"my_ca"` // contains filtered or unexported fields }
func (*HTTPS) GetHTTPClient ¶
func (*HTTPS) LoadConfig ¶
type LDContextElement ¶
type LDContextElement struct { Id string `json:"id",omitemtpy` Type string `json:"type",omitemtpy` Properties []Property `json:"properties",omitempty` Relationships []Relationship `json:"relationships",omitempty` CreatedAt string `json:"createdAt",omitemtpy` Location LDLocation `json:"location",omitempty` ObservationSpace GeoProperty `json:"observationSpace",omitempty` OperationSpace GeoProperty `json:"operationSpace",omitempty` ModifiedAt string `json:"modifiedAt"` }
type LDContextElementResponse ¶
type LDContextElementResponse struct { LDContextElement interface{} `json:"contextElement"` StatusCode StatusCode `json:"statusCode"` }
type LDLocation ¶
type LDLocation struct { Type string `json:"type",omitemtpy` Value interface{} `json:"value",omitemtpy` }
type LDLocationValue ¶
type LDNotifyContextRequest ¶
type LDSubscriptionRequest ¶
type LDSubscriptionRequest struct { Id string `json:"id",omitempty` //URI, if missing, will be assigned during subscription phase and returned to client Type string `json:"type",omitemtpy` //should be equal to "Subscription" Name string `json:"name",omitempty` Description string `json:"description",omitempty` Entities []EntityId `json:"entities",omitempty` WatchedAttributes []string `json:"watchedAttributes",omitempty` TimeInterval uint `json:"timeInterval",omitempty` Q string `json:"q",omitempty` GeoQ GeoQuery `json:"geoQ",omitempty` Csf string `json:"csf",omitempty` IsActive bool `json:"isActive",omitempty` Notification NotificationParams `json:"notification"` Expires string `json:"expires",omitempty` Throttling uint `json:"throttling",omitempty` TemporalQ TemporalQuery `json:"temporalQ",omitempty` Status string `json:"status",omitempty` Subscriber Subscriber `json:"subscriber,omitempty` CreatedAt string `json:"createdAt",omitemtpy` ModifiedAt string `json:"modifiedAt",omitemtpy` }
func (*LDSubscriptionRequest) SetLdIdPattern ¶
func (element *LDSubscriptionRequest) SetLdIdPattern()
type NGSI10Client ¶
func (*NGSI10Client) AppendLDEntityOnRemote ¶
func (nc *NGSI10Client) AppendLDEntityOnRemote(elem map[string]interface{}, eid string) error
func (*NGSI10Client) CreateLDEntityOnRemote ¶
func (nc *NGSI10Client) CreateLDEntityOnRemote(elem map[string]interface{}, link string) error
func (*NGSI10Client) DeleteContext ¶
func (nc *NGSI10Client) DeleteContext(eid *EntityId) error
func (*NGSI10Client) GetEntity ¶
func (nc *NGSI10Client) GetEntity(id string) (*ContextObject, error)
func (*NGSI10Client) InternalDeleteContext ¶
func (nc *NGSI10Client) InternalDeleteContext(eid *EntityId) error
func (*NGSI10Client) InternalQueryContext ¶
func (nc *NGSI10Client) InternalQueryContext(query *QueryContextRequest) ([]ContextElement, error)
func (*NGSI10Client) InternalUpdateContext ¶
func (nc *NGSI10Client) InternalUpdateContext(elem *ContextElement) error
func (*NGSI10Client) NotifyContext ¶
func (nc *NGSI10Client) NotifyContext(elem *ContextElement) error
func (*NGSI10Client) QueryContext ¶
func (nc *NGSI10Client) QueryContext(query *QueryContextRequest) ([]*ContextObject, error)
func (*NGSI10Client) QueryForNGSILDEntity ¶
func (nc *NGSI10Client) QueryForNGSILDEntity(eid string) int
func (*NGSI10Client) QueryForNGSIV1Entity ¶
func (nc *NGSI10Client) QueryForNGSIV1Entity(eid string) int
func (*NGSI10Client) SouthboundUpdateContext ¶
func (nc *NGSI10Client) SouthboundUpdateContext(elem *ContextElement, fs string, fsp string) error
func (*NGSI10Client) SubscribeContext ¶
func (nc *NGSI10Client) SubscribeContext(sub *SubscribeContextRequest, requireReliability bool) (string, error)
func (*NGSI10Client) SubscribeLdContext ¶
func (nc *NGSI10Client) SubscribeLdContext(sub *LDSubscriptionRequest, requireReliability bool) (string, error)
func (*NGSI10Client) UnsubscribeContext ¶
func (nc *NGSI10Client) UnsubscribeContext(sid string) error
func (*NGSI10Client) UpdateContext ¶
func (nc *NGSI10Client) UpdateContext(elem *ContextElement) error
func (*NGSI10Client) UpdateContextObject ¶
func (nc *NGSI10Client) UpdateContextObject(ctxObj *ContextObject) error
func (*NGSI10Client) UpdateLDEntityAttributeOnRemote ¶
func (nc *NGSI10Client) UpdateLDEntityAttributeOnRemote(elem map[string]interface{}, eid string) (error, int)
func (*NGSI10Client) UpdateLDEntityspecificAttributeOnRemote ¶
type NGSI9Client ¶
func (*NGSI9Client) DiscoverContextAvailability ¶
func (nc *NGSI9Client) DiscoverContextAvailability(discoverCtxAvailabilityReq *DiscoverContextAvailabilityRequest) ([]ContextRegistration, error)
func (*NGSI9Client) DiscoveryNearbyIoTBroker ¶
func (nc *NGSI9Client) DiscoveryNearbyIoTBroker(nearby NearBy) (string, error)
func (*NGSI9Client) GetProviderURL ¶
func (nc *NGSI9Client) GetProviderURL(id string) (string, *EntityRegistration)
func (*NGSI9Client) QuerySiteList ¶
func (nc *NGSI9Client) QuerySiteList(geoscope OperationScope) ([]SiteInfo, error)
func (*NGSI9Client) RegisterContext ¶
func (nc *NGSI9Client) RegisterContext(registerCtxReq *RegisterContextRequest) (string, error)
func (*NGSI9Client) SendHeartBeat ¶
func (nc *NGSI9Client) SendHeartBeat(brokerProfile *BrokerProfile) error
func (*NGSI9Client) SubscribeContextAvailability ¶
func (nc *NGSI9Client) SubscribeContextAvailability(sub *SubscribeContextAvailabilityRequest) (string, error)
func (*NGSI9Client) UnregisterEntity ¶
func (nc *NGSI9Client) UnregisterEntity(eid string) error
func (*NGSI9Client) UnsubscribeContextAvailability ¶
func (nc *NGSI9Client) UnsubscribeContextAvailability(sid string) error
func (*NGSI9Client) UpdateLDContextAvailability ¶
func (nc *NGSI9Client) UpdateLDContextAvailability(sub *SubscribeContextAvailabilityRequest, sid string) (string, error)
client to update subscribe Context availbility on discovery
type NGSIAgent ¶
type NGSIAgent struct { Port int SecurityCfg HTTPS CtxNotifyHandler NotifyContextFunc CtxAvailbilityNotifyHandler NotifyContextAvailabilityFunc }
func (*NGSIAgent) SetContextAvailabilityNotifyHandler ¶
func (agent *NGSIAgent) SetContextAvailabilityNotifyHandler(cb NotifyContextAvailabilityFunc)
func (*NGSIAgent) SetContextNotifyHandler ¶
func (agent *NGSIAgent) SetContextNotifyHandler(cb NotifyContextFunc)
type NGSIV2Client ¶
func (*NGSIV2Client) Subscribev2ContextAvailability ¶
func (nc *NGSIV2Client) Subscribev2ContextAvailability(sub *SubscribeContextAvailabilityRequest) (string, error)
func (*NGSIV2Client) Unsubscribev2ContextAvailability ¶
func (nc *NGSIV2Client) Unsubscribev2ContextAvailability(sid string) error
type Notification ¶
type NotificationParams ¶
type NotificationParams struct { Attributes []string `json:"attributes",omitempty` Format string `json:"format",omitempty` Endpoint Endpoint `json:"endpoint",omitemtpy` Status string `json:"status",omitempty` TimeSent uint `json:"timeSent",omitempty` LastNotification string `json:"lastNotification",omitempty` LastFailure string `json:"lastFailure",omitempty` LastSuccess string `json:"lastSuccess",omitempty` }
type NotifyCondition ¶
type NotifyConditionType ¶
type NotifyConditionType int
const ( ONTIMEINTERVAL NotifyConditionType = 1 ONVALUE ONCHANGE )
type NotifyContextAvailabilityFunc ¶
type NotifyContextAvailabilityFunc func(notifyCtxAvailReq *NotifyContextAvailabilityRequest)
type NotifyContextAvailabilityRequest ¶
type NotifyContextAvailabilityRequest struct { SubscriptionId string `json:"subscribeId"` ContextRegistrationResponseList []ContextRegistrationResponse `json:"contextRegistrationResponses,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type NotifyContextAvailabilityResponse ¶
type NotifyContextAvailabilityResponse struct {
ResponseCode StatusCode `json:"responseCode"`
}
type NotifyContextFunc ¶
type NotifyContextFunc func(notifyCtxReq *NotifyContextRequest)
type NotifyContextRequest ¶
type NotifyContextRequest struct { SubscriptionId string `json:"subscriptionId"` Originator string `json:"originator"` ContextResponses []ContextElementResponse `json:"contextResponses,omitempty"` }
type NotifyContextResponse ¶
type NotifyContextResponse struct {
ResponseCode StatusCode `json:"responseCode"`
}
type Notifyv2ContextAvailabilityRequest ¶
type Notifyv2ContextAvailabilityRequest struct { SubscriptionId string `json:"subscribeId"` ContextRegistrationResponseList []ContextRegistrationResponse `json:"contextRegistrationResponses,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type Notifyv2ContextAvailabilityResponse ¶
type Notifyv2ContextAvailabilityResponse struct {
ResponseCode StatusCode `json:"responseCode"`
}
type OperationScope ¶
type OperationScope struct { Type string `json:"scopeType"` Value interface{} `json:"scopeValue"` }
func (*OperationScope) UnmarshalJSON ¶
func (scope *OperationScope) UnmarshalJSON(b []byte) error
type OrionContextAttribute ¶
type OrionContextAttribute struct { Name string `json:"name"` Type string `json:"type,omitempty"` Value interface{} `json:"value"` Metadata []ContextMetadata `json:"metadata,omitempty"` }
type ProblemDetails ¶
type Property ¶
type Property struct { Name string `json:"name",omitemtpy` Type string `json:"type",omitemtpy` Value interface{} `json:"value",omitemtpy` // Can also be a string or a JSON object ObservedAt string `json:"observedAt",omitempty` DatasetId string `json:"DatasetId",omitempty` //<<URI>>, Optional. InstanceId string `json:"InstanceId",omitempty` //<<URI>> uniquely identifying a relationship instance. System Generated, Optional. CreatedAt string `json:"createdAt",omitemtpy` ModifiedAt string `json:"modifiedAt",omitemtpy` UnitCode string `json:"UnitCode",omitempty` ProvidedBy ProvidedBy `json:"providedBy",omitempty` Properties []Property Relationships []Relationship }
type ProvidedBy ¶
type QueryContextRequest ¶
type QueryContextRequest struct { Entities []EntityId `json:"entities"` Attributes []string `json:"attributes,omitempty"` Restriction Restriction `json:"restriction,omitempty"` }
NGSI10
type QueryContextResponse ¶
type QueryContextResponse struct { ContextResponses []ContextElementResponse `json:"contextResponses,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type RegisterContextRequest ¶
type RegisterContextRequest struct { ContextRegistrations []ContextRegistration `json:"contextRegistrations,omitempty"` Duration string `json:"duration,omitempty"` RegistrationId string `json:"registrationId,omitempty"` }
NGSI9
type RegisterContextRequest1 ¶
type RegisterContextRequest1 struct { ContextRegistrations []ContextRegistration1 `json:"contextRegistrations,omitempty"` Duration string `json:"duration,omitempty"` RegistrationId string `json:"registrationId,omitempty"` }
To handle RegisterContextRequest coming from IoT Agent
type RegisterContextResponse ¶
type RegisterContextResponse struct { Duration string `json:"duration,omitempty"` RegistrationId string `json:"registrationId"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type RegistrationInfo ¶
type Relationship ¶
type Relationship struct { Name string `json:"name",omitemtpy` Type string `json:"type",omitemtpy` Object string `json:object,omitemtpy` //<<URI>>, Mandatory ObservedAt string `json:"observedAt",omitempty` ProvidedBy ProvidedBy `json:"providedBy",omitempty` DatasetId string `json:"DatasetId",omitempty` //<<URI>>, Optional. InstanceId string `json:"InstanceId",omitempty` //<<URI>> uniquely identifying a relationship instance. System Generated, Optional. CreatedAt string `json:"createdAt",omitemtpy` ModifiedAt string `json:"modifiedAt",omitemtpy` Properties []Property Relationships []Relationship }
type ResponseError ¶
type ResponseError struct { Success []string `json: "success",omitemtpy` Errors []ProblemDetails `json: "errors",omitemtpy` }
type Restriction ¶
type Restriction struct { AttributeExpression string `json:"attributeExpression, omitempty"` Scopes []OperationScope `json:"scopes,omitempty"` }
func (*Restriction) GetNearbyFilter ¶
func (restriction *Restriction) GetNearbyFilter() *NearBy
func (*Restriction) GetScope ¶
func (restriction *Restriction) GetScope() OperationScope
type StatusCode ¶
type Subject ¶
type Subject struct { Entities []EntityId `json:"entities"` Conditions Conditions `json:"condition,omitempty"` }
type SubscribeContextAvailabilityRequest ¶
type SubscribeContextAvailabilityRequest struct { Entities []EntityId `json:"entities"` Attributes []string `json:"attributes,omitempty"` Reference string `json:"reference"` Duration string `json:"duration,omitempty"` Restriction Restriction `json:"restriction,omitempty"` SubscriptionId string `json:"subscriptionId,omitempty"` }
type SubscribeContextAvailabilityResponse ¶
type SubscribeContextAvailabilityResponse struct { SubscriptionId string `json:"subscribeId"` Duration string `json:"duration,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type SubscribeContextRequest ¶
type SubscribeContextRequest struct { Entities []EntityId `json:"entities"` Attributes []string `json:"attributes,omitempty"` Reference string `json:"reference"` Duration string `json:"duration,omitempty"` Restriction Restriction `json:"restriction,omitempty"` NotifyConditions []NotifyCondition `json:"notifyConditions,omitempty"` Throttling string `json:"throttling,omitempty"` Subscriber Subscriber }
type SubscribeContextResponse ¶
type SubscribeContextResponse struct { SubscribeResponse SubscribeResponse `json:"subscribeResponse,omitempty"` SubscribeError SubscribeError `json:"subscribeError,omitempty"` }
type SubscribeError ¶
type SubscribeError struct { SubscriptionId string `json:"subscriptionId,omitempty"` ErrorCode StatusCode `json:"errorCode"` }
type SubscribeResponse ¶
type Subscriber ¶
type Subscribev2ContextAvailabilityRequest ¶
type Subscribev2ContextAvailabilityRequest struct { Entities []EntityId `json:"entities"` Attributes []string `json:"attributes,omitempty"` Reference string `json:"reference"` Duration string `json:"duration,omitempty"` Restriction Restriction `json:"restriction,omitempty"` Subject Subject `json:"subject"` SubscriptionId string `json:"subscriptionId,omitempty"` Notification Notification `json:"notification"` Conditions Conditions `json:"condition,omitempty"` Throttling int `json:"throttling,omitempty"` Expires string `json:"expires,omitempty"` Status string `json:"status,omitempty"` }
type Subscribev2ContextAvailabilityResponse ¶
type Subscribev2ContextAvailabilityResponse struct { SubscriptionId string `json:"subscribeId"` // Duration string `json:"duration,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type Subscribev2Response ¶
type Subscribev2Response struct { SubscriptionResponse SubscriptionResponse `json:"subscribeResponse,omitempty"` SubscriptionError SubscriptionError `json:"subscribeError,omitempty"` }
type SubscriptionError ¶
type SubscriptionError struct { SubscriptionId string `json:"subscriptionId,omitempty"` ErrorCode StatusCode `json:"errorCode"` }
type SubscriptionRequest ¶
type SubscriptionRequest struct { Attributes []string `json:"attributes,omitempty"` Subscriber Subscriber Conditions Conditions `json:"condition,omitempty"` Description string `json:"description,omitempty"` Subject Subject `json:"subject"` Notification Notification `json:"notification"` Throttling int `json:"throttling,omitempty"` Expires string `json:"expires,omitempty"` Status string `json:"status,omitempty"` }
type SubscriptionResponse ¶
type TemporalQuery ¶
type TimeInterval ¶
type UnsubscribeContextAvailabilityRequest ¶
type UnsubscribeContextAvailabilityRequest struct {
SubscriptionId string `json:"subscriptionId"`
}
type UnsubscribeContextAvailabilityResponse ¶
type UnsubscribeContextAvailabilityResponse struct { SubscriptionId string `json:"subscriptionId"` StatusCode StatusCode `json:"statusCode"` }
type UnsubscribeContextRequest ¶
type UnsubscribeContextRequest struct {
SubscriptionId string `json:"subscriptionId"`
}
type UnsubscribeContextResponse ¶
type UnsubscribeContextResponse struct { SubscriptionId string `json:"subscriptionId"` StatusCode StatusCode `json:"statusCode"` }
type Unsubscribev2ContextAvailabilityRequest ¶
type Unsubscribev2ContextAvailabilityRequest struct {
SubscriptionId string `json:"subscriptionId"`
}
type Unsubscribev2ContextAvailabilityResponse ¶
type Unsubscribev2ContextAvailabilityResponse struct { SubscriptionId string `json:"subscriptionId"` StatusCode StatusCode `json:"statusCode"` }
type UpdateActionType ¶
type UpdateActionType int
const ( UPDATE UpdateActionType = 1 APPEND DELETE )
type UpdateContextAvailabilitySubscriptionRequest ¶
type UpdateContextAvailabilitySubscriptionRequest struct { Entities []EntityId `json:"entities"` Attributes []ContextAttribute `json:"attributes,omitempty"` Duration string `json:"duration,omitempty"` Restriction Restriction `json:"restriction,omitempty"` SubscriptionId string `json:"subscriptionId,omitempty"` }
type UpdateContextAvailabilitySubscriptionResponse ¶
type UpdateContextAvailabilitySubscriptionResponse struct { SubscriptionId string `json:"subscriptionId"` Duration string `json:"duration,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type UpdateContextRequest ¶
type UpdateContextRequest struct { ContextElements []ContextElement `json:"contextElements"` UpdateAction string `json:"updateAction"` }
type UpdateContextResponse ¶
type UpdateContextResponse struct {
ContextResponses []ContextElementResponse `json:"contextResponses"`
}
type UpdateContextSubscriptionRequest ¶
type UpdateContextSubscriptionRequest struct { SubscriptionId string `json:"subscriptionId"` Duration string `json:"duration,omitempty"` Restriction Restriction `json:"restriction,omitempty"` NotifyConditions []NotifyCondition `json:"notifyConditions,omitempty"` Throttling string `json:"throttling,omitempty"` }
type UpdateContextSubscriptionResponse ¶
type UpdateContextSubscriptionResponse struct { SubscribeResponse `json:"subscribeResponse,omitempty"` SubscribeError `json:"subscribeError,omitempty"` }
type ValueObject ¶
type ValueObject struct { Type string `json:"type,omitempty"` Value interface{} `json:"value"` }
Click to show internal directories.
Click to hide internal directories.