2018-08-26 13:15:48 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2018
|
|
|
|
// Mainflux
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//
|
|
|
|
|
2018-05-15 17:13:09 +02:00
|
|
|
package grpc
|
|
|
|
|
2018-10-24 11:21:03 +02:00
|
|
|
import "github.com/mainflux/mainflux/things"
|
2018-05-15 17:13:09 +02:00
|
|
|
|
|
|
|
type accessReq struct {
|
|
|
|
thingKey string
|
2018-05-21 12:51:46 +02:00
|
|
|
chanID uint64
|
2018-05-15 17:13:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (req accessReq) validate() error {
|
2018-05-21 12:51:46 +02:00
|
|
|
if req.chanID == 0 || req.thingKey == "" {
|
2018-05-15 17:13:09 +02:00
|
|
|
return things.ErrMalformedEntity
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2018-05-17 20:17:02 +02:00
|
|
|
|
|
|
|
type identifyReq struct {
|
|
|
|
key string
|
|
|
|
}
|