Versions in this module Expand all Collapse all v1 v1.0.1 Apr 22, 2020 v1.0.0 Apr 18, 2020 Changes in this version + var ErrAuthNotProvided = errors.New("authorization token not provided") + var ErrDataInvalid = errors.New("data is incompatible with thing's schema") + var ErrDataNotProvided = errors.New("thing's data not provided") + var ErrIDLength = errors.New("id length exceeds 16 characters") + var ErrIDNotHex = errors.New("id is not in hexadecimal format") + var ErrIDNotProvided = errors.New("thing's id not provided") + var ErrNameNotProvided = errors.New("thing's name not provided") + var ErrSchemaInvalid = errors.New("invalid schema") + var ErrSchemaNotProvided = errors.New("thing's schema not provided") + var ErrSchemaUndefined = errors.New("thing has no schema") + var ErrSensorInvalid = errors.New("sensor list is incompatible with thing's schema") + var ErrSensorsNotProvided = errors.New("thing's sensors not provided") + type Interactor interface + Auth func(authorization, id string) error + List func(authorization string) error + PublishData func(authorization, thingID string, data []entities.Data) error + Register func(authorization, id, name string) error + RequestData func(authorization, thingID string, sensorIds []int) error + Unregister func(authorization, id string) error + UpdateData func(authorization, thingID string, data []entities.Data) error + UpdateSchema func(authorization, id string, schemaList []entities.Schema) error + type ThingInteractor struct + func NewThingInteractor(logger logging.Logger, publisher amqp.ClientPublisher, ...) *ThingInteractor + func (i *ThingInteractor) Auth(authorization, id string) error + func (i *ThingInteractor) List(authorization string) error + func (i *ThingInteractor) PublishData(authorization, thingID string, data []entities.Data) error + func (i *ThingInteractor) Register(authorization, id, name string) error + func (i *ThingInteractor) RequestData(authorization, thingID string, sensorIds []int) error + func (i *ThingInteractor) Unregister(authorization, id string) error + func (i *ThingInteractor) UpdateData(authorization, thingID string, data []entities.Data) error + func (i *ThingInteractor) UpdateSchema(authorization, thingID string, schemaList []entities.Schema) error