-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmessage.go
More file actions
13 lines (10 loc) · 708 Bytes
/
message.go
File metadata and controls
13 lines (10 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
package gomessagestore
import "github.com/blackhatbrigade/gomessagestore/repository"
//go:generate bash -c "${GOPATH}/bin/mockgen github.com/blackhatbrigade/gomessagestore Message > mocks/message.go"
//Message is an interface for all types of messages (commands, events, etc) that are handled through a message store.
type Message interface {
ToEnvelope() (*repository.MessageEnvelope, error) // used to convert a message to a message envelope
Type() string // returns the message type
Version() int64 // returns the version of the message
Position() int64 // returns the position of the message
}