2024-01-07 10:12:43 +00:00
|
|
|
package base
|
2024-01-06 11:33:46 +00:00
|
|
|
|
|
|
|
import "github.com/vmihailenco/msgpack/v5"
|
|
|
|
|
2024-01-07 10:12:43 +00:00
|
|
|
var (
|
|
|
|
_ EncodeableMessage = (*EncodeableMessageImpl)(nil)
|
|
|
|
)
|
|
|
|
|
2024-01-08 06:16:20 +00:00
|
|
|
//go:generate mockgen -source=encodeable_message.go -destination=../mocks/base/encodeable_message.go -package=base
|
|
|
|
|
2024-01-06 11:33:46 +00:00
|
|
|
type EncodeableMessage interface {
|
|
|
|
msgpack.CustomEncoder
|
|
|
|
}
|
|
|
|
|
|
|
|
type EncodeableMessageImpl struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e EncodeableMessageImpl) EncodeMsgpack(encoder *msgpack.Encoder) error {
|
|
|
|
panic("this method should be implemented by the child class")
|
|
|
|
}
|