github.com/btccom/go-micro/v2@v2.9.3/api/internal/proto/message.pb.go (about) 1 package proto 2 3 type Message struct { 4 data []byte 5 } 6 7 func (m *Message) ProtoMessage() {} 8 9 func (m *Message) Reset() { 10 *m = Message{} 11 } 12 13 func (m *Message) String() string { 14 return string(m.data) 15 } 16 17 func (m *Message) Marshal() ([]byte, error) { 18 return m.data, nil 19 } 20 21 func (m *Message) Unmarshal(data []byte) error { 22 m.data = data 23 return nil 24 } 25 26 func NewMessage(data []byte) *Message { 27 return &Message{data} 28 }