device

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication string
const (
	AuthenticationPreSharedKey  Authentication = "preSharedKey"
	AuthenticationX509          Authentication = "x509"
	AuthenticationUninitialized Authentication = "uninitialized"
)

type BlockwiseTransferConfig

type BlockwiseTransferConfig struct {
	Enabled bool   `yaml:"enabled" json:"enabled"`
	SZXStr  string `yaml:"blockSize" json:"blockSize"`
	// contains filtered or unexported fields
}

func (*BlockwiseTransferConfig) GetSZX

func (*BlockwiseTransferConfig) Validate

func (c *BlockwiseTransferConfig) Validate() error

type CoapConfig

type CoapConfig struct {
	MaxMessageSize    uint32                  `yaml:"maxMessageSize" json:"maxMessageSize"`
	InactivityMonitor InactivityMonitor       `yaml:"inactivityMonitor" json:"inactivityMonitor"`
	BlockwiseTransfer BlockwiseTransferConfig `yaml:"blockwiseTransfer" json:"blockwiseTransfer"`
	OwnershipTransfer OwnershipTransferConfig `yaml:"ownershipTransfer" json:"ownershipTransfer"`
	TLS               TLSConfig               `yaml:"tls" json:"tls"`
}

func (*CoapConfig) Validate

func (c *CoapConfig) Validate() error

type Config

type Config struct {
	COAP CoapConfig `yaml:"coap" json:"coap"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type InactivityMonitor

type InactivityMonitor struct {
	Timeout time.Duration `yaml:"timeout" json:"timeout"`
}

func (*InactivityMonitor) Validate

func (c *InactivityMonitor) Validate() error

type ManufacturerConfig

type ManufacturerConfig struct {
	TLS ManufacturerTLSConfig `yaml:"tls" json:"tls"`
}

func (*ManufacturerConfig) Validate

func (c *ManufacturerConfig) Validate() error

type ManufacturerTLSConfig

type ManufacturerTLSConfig struct {
	CAPool   interface{} `yaml:"caPool" json:"caPool" description:"file path to the root certificates in PEM format"`
	KeyFile  string      `yaml:"keyFile" json:"keyFile" description:"file name of private key in PEM format"`
	CertFile string      `yaml:"certFile" json:"certFile" description:"file name of certificate in PEM format"`
	// contains filtered or unexported fields
}

func (*ManufacturerTLSConfig) GetCAPool

func (c *ManufacturerTLSConfig) GetCAPool() []*x509.Certificate

func (*ManufacturerTLSConfig) GetCertificate

func (c *ManufacturerTLSConfig) GetCertificate() tls.Certificate

func (*ManufacturerTLSConfig) ToCertMangerConfig

func (c *ManufacturerTLSConfig) ToCertMangerConfig() client.Config

func (*ManufacturerTLSConfig) Validate

func (c *ManufacturerTLSConfig) Validate() error

type OwnershipTransferConfig

type OwnershipTransferConfig struct {
	Methods      []OwnershipTransferMethod `yaml:"methods" json:"methods"`
	Manufacturer ManufacturerConfig        `yaml:"manufacturerCertificate" json:"manufacturerCertificate"`
}

func (*OwnershipTransferConfig) Validate

func (c *OwnershipTransferConfig) Validate() error

type OwnershipTransferMethod

type OwnershipTransferMethod string
const (
	OwnershipTransferJustWorks               OwnershipTransferMethod = "justWorks"
	OwnershipTransferManufacturerCertificate OwnershipTransferMethod = "manufacturerCertificate"
)

type PreSharedKeyConfig

type PreSharedKeyConfig struct {
	SubjectIDStr string `yaml:"subjectId" json:"subjectId"`

	Key string `yaml:"key" json:"key"`
	// contains filtered or unexported fields
}

func (*PreSharedKeyConfig) Get

func (c *PreSharedKeyConfig) Get() (uuid.UUID, string)

func (*PreSharedKeyConfig) Validate

func (c *PreSharedKeyConfig) Validate() error

type TLSConfig

type TLSConfig struct {
	Authentication Authentication     `yaml:"authentication" json:"authentication"`
	PreSharedKey   PreSharedKeyConfig `yaml:"preSharedKey" json:"preSharedKey"`
}

func (*TLSConfig) Validate

func (c *TLSConfig) Validate() error

Jump to

Keyboard shortcuts

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