thingDescription

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 19 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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