mirror of
https://github.com/go-micro/go-micro.git
synced 2025-01-05 10:20:53 +02:00
37 lines
602 B
Go
37 lines
602 B
Go
package http
|
|
|
|
import "go-micro.dev/v4/codec"
|
|
|
|
type httpMessage struct {
|
|
topic string
|
|
payload interface{}
|
|
contentType string
|
|
header map[string]string
|
|
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() map[string]string {
|
|
return r.header
|
|
}
|
|
|
|
func (r *httpMessage) Body() []byte {
|
|
return r.body
|
|
}
|
|
|
|
func (r *httpMessage) Codec() codec.Reader {
|
|
return r.codec
|
|
}
|