client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	ID          string `json:"id" validate:"required"`
	Name        string `json:"name" validate:"required"`
	Description string `json:"description" validate:"required"`
	Type        string `json:"type" validate:"required"`
}

Device represents a registered IoT device

type DeviceStore

type DeviceStore interface {
	CreateDevice(device Device) error
	GetDevice(id string) (Device, error)
	DeleteDevice(id string) error
	GetDevices() ([]Device, error)
}

type DeviceStoreClient

type DeviceStoreClient struct {
	// contains filtered or unexported fields
}

func NewDeviceStoreClient

func NewDeviceStoreClient(baseUrl string) *DeviceStoreClient

func (*DeviceStoreClient) CreateDevice

func (c *DeviceStoreClient) CreateDevice(device Device) error

func (*DeviceStoreClient) DeleteDevice added in v0.4.0

func (c *DeviceStoreClient) DeleteDevice(id string) error

func (*DeviceStoreClient) GetDevice

func (c *DeviceStoreClient) GetDevice(id string) (Device, error)

func (*DeviceStoreClient) GetDevices added in v0.5.0

func (c *DeviceStoreClient) GetDevices() ([]Device, error)

Jump to

Keyboard shortcuts

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