Documentation ¶
Index ¶
- type ContextAttribute
- type ContextElement
- type ContextElementResponse
- type ContextMetadata
- type ContextRegistration
- type ContextRegistrationAttribute
- type ContextRegistrationResponse
- type ConvertibleBoolean
- type DiscoverContextAvailabilityRequest
- type DiscoverContextAvailabilityResponse
- type EntityId
- type Gongsi
- func (g *Gongsi) ConvQueryContext(eid string) (string, error)
- func (g *Gongsi) ConvQueryContextAttribute(entity, attribute string) (string, error)
- func (g *Gongsi) Init()
- func (g *Gongsi) QueryContext(elem ContextElement) (string, error)
- func (g *Gongsi) SetSSL(useSSL bool)
- func (g *Gongsi) UpdateContext(elem ContextElement) (string, error)
- func (g *Gongsi) Version() (string, error)
- type NotifyCondition
- type NotifyConditionType
- type NotifyContextAvailabilityRequest
- type NotifyContextAvailabilityResponse
- type NotifyContextRequest
- type NotifyContextResponse
- type OperationScope
- type QueryContextRequest
- type QueryContextResponse
- type RegisterContextRequest
- type RegisterContextResponse
- type Restriction
- type StatusCode
- type SubscribeContextAvailabilityRequest
- type SubscribeContextAvailabilityResponse
- type SubscribeContextRequest
- type SubscribeContextResponse
- type SubscribeError
- type SubscribeResponse
- type UnsubscribeContextAvailabilityRequest
- type UnsubscribeContextAvailabilityResponse
- type UnsubscribeContextRequest
- type UnsubscribeContextResponse
- type UpdateActionType
- type UpdateContextAvailabilitySubscriptionRequest
- type UpdateContextAvailabilitySubscriptionResponse
- type UpdateContextRequest
- type UpdateContextResponse
- type UpdateContextSubscriptionRequest
- type UpdateContextSubscriptionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextAttribute ¶
type ContextAttribute struct { Name string `json:"name"` Type string `json:"type,omitempty"` Value string `json:"value"` Metadatas []ContextMetadata `json:"metadatas,omitempty"` }
type ContextElement ¶
type ContextElement struct { Id string `json:"id"` Type string `json:"type,omitempty"` IsPattern interface{} `json:"isPattern"` AttributeDomainName string `json:"attributeDomainName,omitempty"` Attributes []ContextAttribute `json:"attributes,omitempty"` Metadatas []ContextMetadata `json:"metadatas,omitempty"` }
type ContextElementResponse ¶
type ContextElementResponse struct { ContextElement ContextElement `json:"contextElement"` StatusCode StatusCode `json:"statusCode"` }
type ContextMetadata ¶
type ContextRegistration ¶
type ContextRegistration struct { EntityIdList []EntityId `json:"EntityIdList,omitempty"` ContextRegistrationAttributes []ContextRegistrationAttribute `json:"ContextRegistrationAttributes,omitempty"` Metadatas []ContextMetadata `json:"metadatas,omitempty"` ProvidingApplication string `json:"ProvidingApplication"` }
type ContextRegistrationAttribute ¶
type ContextRegistrationAttribute struct { Name string `json:"name"` Type string `json:"type,omitempty"` IsDomain bool `json:"isDomain"` Metadatas []ContextMetadata `json:"metadatas,omitempty"` }
type ContextRegistrationResponse ¶
type ContextRegistrationResponse struct { ContextRegistration ContextRegistration `json:"contextRegistration"` ErrorCode StatusCode `json:"errorCode"` }
type ConvertibleBoolean ¶
type ConvertibleBoolean bool
func (ConvertibleBoolean) UnmarshalJSON ¶
func (bit ConvertibleBoolean) UnmarshalJSON(data []byte) error
type DiscoverContextAvailabilityRequest ¶
type DiscoverContextAvailabilityRequest struct { Entities []EntityId `json:"entities"` Attributes []ContextAttribute `json:"attributes,omitempty"` Restriction Restriction `json:"restriction,omitempty"` }
type DiscoverContextAvailabilityResponse ¶
type DiscoverContextAvailabilityResponse struct { ContextRegistrationResponses []ContextRegistrationResponse `json:"contextRegistrationResponses,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type Gongsi ¶
type Gongsi struct { Host string Port int Encoding string // contains filtered or unexported fields }
func (*Gongsi) ConvQueryContextAttribute ¶
func (*Gongsi) QueryContext ¶
func (g *Gongsi) QueryContext(elem ContextElement) (string, error)
func (*Gongsi) UpdateContext ¶
func (g *Gongsi) UpdateContext(elem ContextElement) (string, error)
type NotifyCondition ¶
type NotifyCondition struct { Type NotifyConditionType `json:"name"` // CondValues []ValueList `json:"condValues,omitempty"` Restriction string `json:"restriction,omitempty"` }
type NotifyConditionType ¶
type NotifyConditionType int
const ( ONTIMEINTERVAL NotifyConditionType = 1 ONVALUE ONCHANGE )
type NotifyContextAvailabilityRequest ¶
type NotifyContextAvailabilityRequest struct { SubscriptionId string `json:"subscriptionId"` ContextRegistrations []ContextRegistration `json:"contextRegistrations,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type NotifyContextAvailabilityResponse ¶
type NotifyContextAvailabilityResponse struct {
ResponseCode StatusCode `json:"responseCode"`
}
type NotifyContextRequest ¶
type NotifyContextRequest struct { SubscriptionId string `json:"subscriptionId"` Originator string `json:"originator"` Restriction Restriction `json:"restriction,omitempty"` ContextResponses []ContextElementResponse `json:"contextResponses,omitempty"` }
type NotifyContextResponse ¶
type NotifyContextResponse struct {
ResponseCode StatusCode `json:"responseCode"`
}
type OperationScope ¶
type QueryContextRequest ¶
type QueryContextRequest struct { Entities []ContextElement `json:"entities"` Attributes []string `json:"attributes,omitempty"` Restriction Restriction `json:"restriction,omitempty"` }
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"` }
type RegisterContextResponse ¶
type RegisterContextResponse struct { Duration string `json:"duration,omitempty"` RegistrationId string `json:"registrationId"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type Restriction ¶
type Restriction struct { AttributeExpression string `json:"attributeExpression"` Scope []OperationScope `json:"scope,omitempty"` }
type StatusCode ¶
type SubscribeContextAvailabilityRequest ¶
type SubscribeContextAvailabilityRequest struct { Entities []EntityId `json:"entities"` Attributes []ContextAttribute `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:"subscriptionId"` Duration string `json:"duration,omitempty"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
type SubscribeContextRequest ¶
type SubscribeContextRequest struct { Entities []EntityId `json:"entities"` Attributes []ContextAttribute `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"` }
type SubscribeContextResponse ¶
type SubscribeContextResponse struct { SubscribeResponse `json:"subscribeResponse,omitempty"` SubscribeError `json:"subscribeError,omitempty"` }
type SubscribeError ¶
type SubscribeResponse ¶
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 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"` ErrorCode StatusCode `json:"errorCode,omitempty"` }
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"` }
Click to show internal directories.
Click to hide internal directories.