1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-28 13:48:49 +08:00
Mainflux.mainflux/http/api/requests.go
b1ackd0t ada5813f47
MF-1455 - Update Versions of Protobuf (#1704)
* 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>
2023-02-02 18:28:32 +01:00

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
}