device

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: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DeviceResourceType      = "oic.d.virtual"
	TestResourcePropertyKey = "my-property"
	TestResourceType        = "x.plgd.test"
)

Variables

This section is empty.

Functions

func GetAdditionalProperties

func GetAdditionalProperties() map[string]interface{}

func GetDataSchemaForAdditionalProperties

func GetDataSchemaForAdditionalProperties() map[string]thingDescription.DataSchema

func GetPropertyDescriptionForTestResource

func GetPropertyDescriptionForTestResource() thingDescription.PropertyElement

func GetTestResourceHref

func GetTestResourceHref(id int) string

func GetThingDescription

func GetThingDescription(path string, numResources int) (thingDescription.ThingDescription, error)

func PatchTestResourcePropertyElement

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

Types

type CloudConfig

type CloudConfig struct {
	Enabled bool      `yaml:"enabled" json:"enabled" description:"enable cloud connection"`
	CloudID string    `yaml:"cloudID" json:"cloudID" description:"cloud id"`
	TLS     TLSConfig `yaml:"tls" json:"tls"`
}

func (*CloudConfig) Validate

func (c *CloudConfig) Validate() error

type Config

type Config struct {
	service.Config             `yaml:",inline"`
	Log                        LogConfig              `yaml:"log" json:"log"`
	Cloud                      CloudConfig            `yaml:"cloud" json:"cloud"`
	Credential                 CredentialConfig       `yaml:"credential" json:"credential"`
	ThingDescription           ThingDescriptionConfig `yaml:"thingDescription" json:"thingDescription"`
	NumGeneratedBridgedDevices int                    `yaml:"numGeneratedBridgedDevices"`
	NumResourcesPerDevice      int                    `yaml:"numResourcesPerDevice"`
}

func LoadConfig

func LoadConfig(configFile string) (Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type CredentialConfig

type CredentialConfig struct {
	Enabled bool `yaml:"enabled" json:"enabled" description:"enable credential manager"`
}

type LogConfig

type LogConfig struct {
	Level log.Level `yaml:"level" json:"level" description:"log level"`
}

type TLSConfig

type TLSConfig struct {
	CAPoolPath      string `yaml:"caPoolPath" json:"caPool" description:"file path to the root certificates in PEM format"`
	KeyPath         string `yaml:"keyPath" json:"keyFile" description:"file path to the private key in PEM format"`
	CertPath        string `yaml:"certPath" json:"certFile" description:"file path to the certificate in PEM format"`
	UseSystemCAPool bool   `yaml:"useSystemCAPool" json:"useSystemCaPool" description:"use system certification pool"`
}

func (*TLSConfig) Validate

func (c *TLSConfig) Validate() error

type ThingDescriptionConfig

type ThingDescriptionConfig struct {
	Enabled bool   `yaml:"enabled" json:"enabled" description:"enable thing description"`
	File    string `yaml:"file" json:"file" description:"file path to the thing description"`
}

Jump to

Keyboard shortcuts

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