2015-01-13 23:31:27 +00:00
|
|
|
package client
|
|
|
|
|
2019-01-10 11:39:39 +00:00
|
|
|
import (
|
2021-10-02 19:55:07 +03:00
|
|
|
"go.unistack.org/micro/v3/codec"
|
2019-01-10 11:39:39 +00:00
|
|
|
)
|
|
|
|
|
2020-07-27 13:22:00 +01:00
|
|
|
type testRequest struct {
|
2021-03-06 19:45:13 +03:00
|
|
|
codec codec.Codec
|
|
|
|
body interface{}
|
2021-04-25 11:58:24 +03:00
|
|
|
service string
|
2019-01-18 12:30:39 +00:00
|
|
|
method string
|
2019-01-10 21:25:31 +00:00
|
|
|
endpoint string
|
2015-05-23 11:53:40 +01:00
|
|
|
contentType string
|
2021-04-25 11:58:24 +03:00
|
|
|
opts RequestOptions
|
2015-01-13 23:31:27 +00:00
|
|
|
}
|
|
|
|
|
2020-07-27 13:22:00 +01:00
|
|
|
func (r *testRequest) ContentType() string {
|
2015-01-13 23:31:27 +00:00
|
|
|
return r.contentType
|
|
|
|
}
|
|
|
|
|
2020-07-27 13:22:00 +01:00
|
|
|
func (r *testRequest) Service() string {
|
2015-01-13 23:31:27 +00:00
|
|
|
return r.service
|
|
|
|
}
|
|
|
|
|
2020-07-27 13:22:00 +01:00
|
|
|
func (r *testRequest) Method() string {
|
2019-01-18 10:12:57 +00:00
|
|
|
return r.method
|
|
|
|
}
|
|
|
|
|
2020-07-27 13:22:00 +01:00
|
|
|
func (r *testRequest) Endpoint() string {
|
2019-01-10 21:25:31 +00:00
|
|
|
return r.endpoint
|
2015-01-13 23:31:27 +00:00
|
|
|
}
|
|
|
|
|
2020-07-27 13:22:00 +01:00
|
|
|
func (r *testRequest) Body() interface{} {
|
2019-01-10 11:39:39 +00:00
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
2020-11-23 16:18:47 +03:00
|
|
|
func (r *testRequest) Codec() codec.Codec {
|
2019-01-10 11:39:39 +00:00
|
|
|
return r.codec
|
2015-01-13 23:31:27 +00:00
|
|
|
}
|
2015-12-17 20:37:35 +00:00
|
|
|
|
2020-07-27 13:22:00 +01:00
|
|
|
func (r *testRequest) Stream() bool {
|
2015-12-31 18:11:46 +00:00
|
|
|
return r.opts.Stream
|
2015-12-17 20:37:35 +00:00
|
|
|
}
|