mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-28 13:48:49 +08:00

* initial commit * add protoc-gen-gofast * update generated files * fix linting * fix consumers error on message conversion * fix copying values on transformers * initial commit * initial commit * add protoc-gen-gofast * update generated files * fix linting * fix consumers error on message conversion * fix copying values on transformers * embedded for forward compatible. * remove gogo * embedded for forward compatible. * update protoc compiler * fix linting * remove hex comment Signed-off-by: rodneyosodo <socials@rodneyosodo.com>
23 lines
365 B
Go
23 lines
365 B
Go
// Copyright (c) Mainflux
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package api
|
|
|
|
import (
|
|
"github.com/mainflux/mainflux/internal/apiutil"
|
|
"github.com/mainflux/mainflux/pkg/messaging"
|
|
)
|
|
|
|
type publishReq struct {
|
|
msg *messaging.Message
|
|
token string
|
|
}
|
|
|
|
func (req publishReq) validate() error {
|
|
if req.token == "" {
|
|
return apiutil.ErrBearerKey
|
|
}
|
|
|
|
return nil
|
|
}
|