micro-server-http/message.go

37 lines
619 B
Go
Raw Normal View History

2018-12-19 10:33:23 +03:00
package http
import "github.com/unistack-org/micro/v3/codec"
2018-12-19 12:47:03 +03:00
type httpMessage struct {
2018-12-19 10:33:23 +03:00
topic string
payload interface{}
contentType string
header map[string]string
body []byte
codec codec.Reader
2018-12-19 10:33:23 +03:00
}
2018-12-19 12:47:03 +03:00
func (r *httpMessage) Topic() string {
2018-12-19 10:33:23 +03:00
return r.topic
}
2018-12-19 12:47:03 +03:00
func (r *httpMessage) Payload() interface{} {
2018-12-19 10:33:23 +03:00
return r.payload
}
func (r *httpMessage) ContentType() string {
return r.contentType
}
func (r *httpMessage) Header() map[string]string {
return r.header
}
func (r *httpMessage) Body() []byte {
return r.body
}
func (r *httpMessage) Codec() codec.Reader {
return r.codec
}