micro-server-http/message.go
Vasiliy Tolstov a215521821 fieldalignment
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-25 12:09:09 +03:00

40 lines
667 B
Go

package http
import (
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/metadata"
)
type httpMessage struct {
payload interface{}
codec codec.Codec
header metadata.Metadata
topic string
contentType string
body []byte
}
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.Codec {
return r.codec
}