1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-04 22:17:59 +08:00
Mainflux.mainflux/http/adapter.go
Drasko DRASKOVIC 199a44b0a0 Change writer message format - accept raw messages
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2017-09-29 16:18:41 +02:00

19 lines
384 B
Go

package http
import "github.com/mainflux/mainflux/writer"
var _ Service = (*adapterService)(nil)
type adapterService struct {
mr writer.MessageRepository
}
// NewService instantiates the domain service implementation.
func NewService(mr writer.MessageRepository) Service {
return &adapterService{mr}
}
func (as *adapterService) Send(msg writer.RawMessage) {
as.mr.Save(msg)
}