thingDescription

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 19 Imported by: 3

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

func PatchCloudResourcePropertyElement added in v2.5.1

func PatchCloudResourcePropertyElement(pe thingDescription.PropertyElement, deviceID uuid.UUID, baseURL string, contentType message.MediaType, createForms bridgeTD.CreateFormsFunc) (thingDescription.PropertyElement, error)

func PatchCredentialResourcePropertyElement added in v2.5.1

func PatchCredentialResourcePropertyElement(pe thingDescription.PropertyElement, deviceID uuid.UUID, baseURL string, contentType message.MediaType, createForms bridgeTD.CreateFormsFunc) (thingDescription.PropertyElement, error)

func PatchDeviceResourcePropertyElement added in v2.5.1

func PatchDeviceResourcePropertyElement(pe thingDescription.PropertyElement, deviceID uuid.UUID, baseURL string, contentType message.MediaType, deviceType string, createForms bridgeTD.CreateFormsFunc) (thingDescription.PropertyElement, error)

func PatchMaintenanceResourcePropertyElement added in v2.5.1

func PatchMaintenanceResourcePropertyElement(pe thingDescription.PropertyElement, deviceID uuid.UUID, baseURL string, contentType message.MediaType, createForms bridgeTD.CreateFormsFunc) (thingDescription.PropertyElement, error)

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

type Resource struct {
	*resources.Resource
	// contains filtered or unexported fields
}

func New

func New(uri string, onGetThingDescription GetThingDescription, onRegisterSubscription RegisterSubscription) *Resource

func (*Resource) CreateSubscription

func (r *Resource) CreateSubscription(req *net.Request, handler func(*pool.Message, error)) (func(), error)

func (*Resource) Get

func (r *Resource) Get(request *net.Request) (*pool.Message, error)

Jump to

Keyboard shortcuts

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