Documentation
¶
Index ¶
Constants ¶
View Source
const ( ResourceURI = "/.well-known/wot" ResourceType = "wot.thing" )
Variables ¶
View Source
var MessageTypeTDJson = message.MediaType(432) ///< application/td+json
Functions ¶
func GetOCFResourcePropertyElement ¶
func GetOCFResourcePropertyElement(resourceHref string) (thingDescription.PropertyElement, bool)
func GetOCFThingDescription ¶
func GetOCFThingDescription() thingDescription.ThingDescription
Types ¶
type GetThingDescription ¶
type GetThingDescription func(ctx context.Context, endpoints schema.Endpoints) *thingDescription.ThingDescription
type RegisterSubscription ¶
type RegisterSubscription func(subscription func(td *thingDescription.ThingDescription, closed bool)) func()
type Resource ¶
func New ¶
func New(uri string, onGetThingDescription GetThingDescription, onRegisterSubscription RegisterSubscription) *Resource
func (*Resource) CreateSubscription ¶
Click to show internal directories.
Click to hide internal directories.