core

package
v0.0.0-...-6312dd6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionAffordance

type ActionAffordance struct {
	*ia.InteractionAffordance
	Input      data_schema.Schema `json:"input,omitempty"`
	Output     data_schema.Schema `json:"output,omitempty"`
	Safe       bool               `json:"safe,omitempty" wot:"withDefault"`
	Idempotent bool               `json:"idempotent,omitempty" wot:"withDefault"`
}

func (*ActionAffordance) UnmarshalJSON

func (a *ActionAffordance) UnmarshalJSON(data []byte) error

type ActionDescription

type ActionDescription struct {
	AtType       string                        `json:"@type,omitempty,optional"`
	Title        string                        `json:"title,omitempty,optional"`
	Titles       map[string]string             `json:"titles,omitempty,optional"`
	Description  string                        `json:"description,omitempty,optional"`
	Descriptions map[string]string             `json:"descriptions,omitempty,optional"`
	Forms        []controls.Form               `json:"forms,omitempty,mandatory" wot:"optional"`
	UriVariables map[string]data_schema.Schema `json:"uriVariables,omitempty"`

	Input      ActionSchema       `json:"input,omitempty"`
	Output     data_schema.Schema `json:"output,omitempty"`
	Safe       bool               `json:"safe,omitempty" wot:"withDefault"`
	Idempotent bool               `json:"idempotent,omitempty" wot:"withDefault"`
}

type ActionSchema

type ActionSchema = data_schema.Schema

type EventAffordance

type EventAffordance struct {
	ia.InteractionAffordance
	Subscription *schema.DataSchema `json:"subscription,omitempty"`
	Data         *schema.DataSchema `json:"data,omitempty"`
	Cancellation *schema.DataSchema `json:"cancellation,omitempty"`
}

func (*EventAffordance) UnmarshalJSON

func (e *EventAffordance) UnmarshalJSON(data []byte) error

type Thing

type Thing struct {
	AtContext controls.URI           `json:"@context,omitempty" wot:"mandatory"`
	AtType    controls.ArrayOrString `json:"@type" wot:"optional"`
	Id        controls.URI           `json:"id" wot:"optional"`
	Title     string                 `json:"title,omitempty" wot:"mandatory"`
	Titles    controls.MultiLanguage `json:"titles,omitempty" wot:"optional"`

	Description  string                 `json:"description,omitempty" wot:"optional"`
	Descriptions controls.MultiLanguage `json:"descriptions,omitempty" wot:"optional"`

	Support controls.URI `json:"support,omitempty" wot:"optional"`
	Base    controls.URI `json:"base,omitempty" wot:"optional"`

	Version  *VersionInfo       `json:"version,omitempty" wot:"optional"`
	Created  *controls.DataTime `json:"created,omitempty" wot:"optional"`
	Modified *controls.DataTime `json:"-" wot:"optional"`

	Properties ThingProperties `json:"properties,omitempty" wot:"optional"`
	Actions    ThingActions    `json:"actions,omitempty" wot:"optional"`
	Events     ThingEvents     `json:"events,omitempty" wot:"optional"`

	Links []controls.Link `json:"links,omitempty"`
	Forms []controls.Form `json:"forms,omitempty"`

	Security            controls.ArrayOrString   `json:"security,omitempty" wot:"mandatory"`
	SecurityDefinitions ThingSecurityDefinitions `json:"securityDefinitions,omitempty" wot:"optional"`

	Profile           []controls.URI         `json:"profile,omitempty" wot:"optional"`
	SchemaDefinitions ThingSchemaDefinitions `json:"schemaDefinitions,omitempty" wot:"optional"`
}

func (*Thing) GetAction

func (t *Thing) GetAction(name string) *ActionAffordance

func (*Thing) GetHref

func (t *Thing) GetHref() string

func (*Thing) GetId

func (t *Thing) GetId() string

func (*Thing) GetProperty

func (t *Thing) GetProperty(name string) *property_affordance.PropertyAffordance

func (*Thing) GetURI

func (t *Thing) GetURI() string

type ThingActions

type ThingActions map[string]*ActionAffordance

type ThingEvents

type ThingEvents map[string]*EventAffordance

type ThingSchemaDefinitions

type ThingSchemaDefinitions map[string]dataSchema.DataSchema

type ThingSecurityDefinitions

type ThingSecurityDefinitions map[string]securityScheme.SecurityScheme

type VersionInfo

type VersionInfo struct {
	Instance string `json:"instance"`
	Model    string `json:"model"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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