Documentation ¶
Index ¶
- func NewLogger(id uuid.UUID, level pkgLog.Level) pkgLog.Logger
- type CAPoolGetter
- type CloudConfig
- type Config
- type CredentialConfig
- type Device
- func (d *Device) AddResources(resource ...Resource)
- func (d *Device) Close()
- func (d *Device) CloseAndDeleteResource(resourceHref string) bool
- func (d *Device) ExportConfig() Config
- func (d *Device) GetCloudManager() *cloud.Manager
- func (d *Device) GetID() uuid.UUID
- func (d *Device) GetLinks(request *net.Request) (links schema.ResourceLinks)
- func (d *Device) GetLinksFilteredBy(endpoints schema.Endpoints, deviceIDfilter uuid.UUID, ...) (links schema.ResourceLinks)
- func (d *Device) GetLoop() *eventloop.Loop
- func (d *Device) GetName() string
- func (d *Device) GetProtocolIndependentID() uuid.UUID
- func (d *Device) GetResource(resourceHref string) (Resource, bool)
- func (d *Device) GetResourceTypes() []string
- func (d *Device) GetThingDescriptionManager() *thingDescription.Manager
- func (d *Device) HandleRequest(req *net.Request) (*pool.Message, error)
- func (d *Device) Init()
- func (d *Device) LoadAndDeleteResource(resourceHref string) (Resource, bool)
- func (d *Device) Range(f func(resourceHref string, resource Resource) bool)
- type GetThingDescription
- type OnDeviceUpdated
- type Option
- func WithCAPool(caPool CAPoolGetter) Option
- func WithCloudOptions(cloudOptions ...cloud.Option) Option
- func WithEventLoop(loop *eventloop.Loop) Option
- func WithGetAdditionalPropertiesForResponse(getAdditionalProperties device.GetAdditionalPropertiesForResponseFunc) Option
- func WithGetCertificates(getCertificates cloud.GetCertificates) Option
- func WithLogger(logger log.Logger) Option
- func WithOnDeviceUpdated(onDeviceUpdated OnDeviceUpdated) Option
- func WithThingDescription(getThingDescription GetThingDescription) Option
- type OptionsCfg
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CAPoolGetter ¶
type CloudConfig ¶
type Config ¶
type Config struct { ID uuid.UUID Name string ProtocolIndependentID uuid.UUID ResourceTypes []string MaxMessageSize uint32 Cloud CloudConfig Credential CredentialConfig }
type CredentialConfig ¶
type CredentialConfig struct { Enabled bool credential.Config }
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) AddResources ¶ added in v2.4.1
func (*Device) CloseAndDeleteResource ¶
CloseAndDeleteResource resource is closed and also unpublished from the cloud
func (*Device) ExportConfig ¶
func (*Device) GetCloudManager ¶
func (*Device) GetLinks ¶
func (d *Device) GetLinks(request *net.Request) (links schema.ResourceLinks)
func (*Device) GetLinksFilteredBy ¶
func (*Device) GetProtocolIndependentID ¶
func (*Device) GetResourceTypes ¶
func (*Device) GetThingDescriptionManager ¶ added in v2.5.0
func (d *Device) GetThingDescriptionManager() *thingDescription.Manager
GetThingDescriptionManager returns thing description manager of the device.
func (*Device) HandleRequest ¶
func (*Device) LoadAndDeleteResource ¶
LoadAndDeleteResource resource need to be closed after usage and also unpublished from the cloud
type GetThingDescription ¶ added in v2.5.0
type OnDeviceUpdated ¶
type OnDeviceUpdated func(d *Device)
type Option ¶
type Option func(*OptionsCfg)
func WithCAPool ¶
func WithCAPool(caPool CAPoolGetter) Option
func WithCloudOptions ¶ added in v2.4.3
func WithEventLoop ¶ added in v2.4.0
func WithGetAdditionalPropertiesForResponse ¶
func WithGetAdditionalPropertiesForResponse(getAdditionalProperties device.GetAdditionalPropertiesForResponseFunc) Option
func WithGetCertificates ¶
func WithGetCertificates(getCertificates cloud.GetCertificates) Option
func WithLogger ¶
func WithOnDeviceUpdated ¶
func WithOnDeviceUpdated(onDeviceUpdated OnDeviceUpdated) Option
func WithThingDescription ¶ added in v2.5.0
func WithThingDescription(getThingDescription GetThingDescription) Option
type OptionsCfg ¶
type OptionsCfg struct {
// contains filtered or unexported fields
}
type Resource ¶
type Resource = interface { Close() ETag() []byte GetHref() string GetResourceTypes() []string GetResourceInterfaces() []string HandleRequest(req *net.Request) (*pool.Message, error) GetPolicyBitMask() schema.BitMask SetObserveHandler(loop *eventloop.Loop, createSubscription resources.CreateSubscriptionFunc) UpdateETag() SupportsOperations() resources.SupportedOperation }
Click to show internal directories.
Click to hide internal directories.