mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +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>
19 lines
363 B
Go
19 lines
363 B
Go
package mocks
|
|
|
|
import "github.com/mainflux/mainflux/pkg/messaging"
|
|
|
|
type MockPublisher struct{}
|
|
|
|
// NewPublisher returns mock message publisher.
|
|
func NewPublisher() messaging.Publisher {
|
|
return MockPublisher{}
|
|
}
|
|
|
|
func (pub MockPublisher) Publish(topic string, msg *messaging.Message) error {
|
|
return nil
|
|
}
|
|
|
|
func (pub MockPublisher) Close() error {
|
|
return nil
|
|
}
|