micro-server-http/message.go
Vasiliy Tolstov 3fc7db17c3 update metadata
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-18 13:08:50 +03:00

40 lines
669 B
Go

package http
import (
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/metadata"
)
type httpMessage struct {
topic string
payload interface{}
contentType string
header metadata.Metadata
body []byte
codec codec.Reader
}
func (r *httpMessage) Topic() string {
return r.topic
}
func (r *httpMessage) Payload() interface{} {
return r.payload
}
func (r *httpMessage) ContentType() string {
return r.contentType
}
func (r *httpMessage) Header() metadata.Metadata {
return r.header
}
func (r *httpMessage) Body() []byte {
return r.body
}
func (r *httpMessage) Codec() codec.Reader {
return r.codec
}