mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-09 19:29:29 +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>
24 lines
434 B
Go
24 lines
434 B
Go
// Copyright (c) Mainflux
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
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
|
|
}
|