micro/client/test_request.go

44 lines
699 B
Go
Raw Normal View History

2015-01-14 02:31:27 +03:00
package client
2019-01-10 14:39:39 +03:00
import (
"github.com/unistack-org/micro/v3/codec"
2019-01-10 14:39:39 +03:00
)
type testRequest struct {
opts RequestOptions
codec codec.Codec
body interface{}
2019-01-18 15:30:39 +03:00
method string
2019-01-11 00:25:31 +03:00
endpoint string
2015-05-23 13:53:40 +03:00
contentType string
service string
2015-01-14 02:31:27 +03:00
}
func (r *testRequest) ContentType() string {
2015-01-14 02:31:27 +03:00
return r.contentType
}
func (r *testRequest) Service() string {
2015-01-14 02:31:27 +03:00
return r.service
}
func (r *testRequest) Method() string {
2019-01-18 13:12:57 +03:00
return r.method
}
func (r *testRequest) Endpoint() string {
2019-01-11 00:25:31 +03:00
return r.endpoint
2015-01-14 02:31:27 +03:00
}
func (r *testRequest) Body() interface{} {
2019-01-10 14:39:39 +03:00
return r.body
}
func (r *testRequest) Codec() codec.Codec {
2019-01-10 14:39:39 +03:00
return r.codec
2015-01-14 02:31:27 +03:00
}
2015-12-17 23:37:35 +03:00
func (r *testRequest) Stream() bool {
return r.opts.Stream
2015-12-17 23:37:35 +03:00
}