2018-08-26 19:15:48 +08:00
|
|
|
//
|
|
|
|
// Copyright (c) 2018
|
|
|
|
// Mainflux
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//
|
|
|
|
|
2018-04-11 20:29:04 +08:00
|
|
|
package mocks
|
|
|
|
|
2019-07-18 21:01:09 +08:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/mainflux/mainflux"
|
|
|
|
)
|
2018-04-11 20:29:04 +08:00
|
|
|
|
|
|
|
var _ (mainflux.MessagePublisher) = (*mockPublisher)(nil)
|
|
|
|
|
|
|
|
type mockPublisher struct{}
|
|
|
|
|
|
|
|
// NewPublisher returns mock message publisher.
|
|
|
|
func NewPublisher() mainflux.MessagePublisher {
|
|
|
|
return mockPublisher{}
|
|
|
|
}
|
|
|
|
|
2019-07-18 21:01:09 +08:00
|
|
|
func (pub mockPublisher) Publish(_ context.Context, _ string, msg mainflux.RawMessage) error {
|
2018-04-11 20:29:04 +08:00
|
|
|
return nil
|
|
|
|
}
|