Documentation ¶
Index ¶
- Variables
- func AggregateResults(c *CallConfig)
- type CallConfig
- type CallOption
- type Client
- type ClientFactory
- type ClientMock
- func (c *ClientMock) Delete(ctx context.Context, uri string) response.RPC
- func (c *ClientMock) Get(ctx context.Context, uri string, opts ...CallOption) response.RPC
- func (c *ClientMock) Patch(ctx context.Context, uri string, body *json.RawMessage) response.RPC
- func (c *ClientMock) Post(ctx context.Context, uri string, body *json.RawMessage) response.RPC
- type Collector
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // JSONMarshalFunc function pointer for the json.Marshal JSONMarshalFunc = json.Marshal // DecryptWithPrivateKeyFunc function pointer for the common.DecryptWithPrivateKey DecryptWithPrivateKeyFunc = common.DecryptWithPrivateKey // JSONUnmarshalFunc function pointer for the json.Unmarshal JSONUnmarshalFunc = json.Unmarshal // FindAllFunc function pointer for the smodel.FindAll FindAllFunc = smodel.FindAll // IoutilReadAllFunc function pointer for the ioutil.ReadAll IoutilReadAllFunc = ioutil.ReadAll )
Functions ¶
Types ¶
type CallConfig ¶
type CallConfig struct {
// contains filtered or unexported fields
}
CallConfig ...
func ReturnFirstResponse ¶
func ReturnFirstResponse(c *CallConfig) *CallConfig
ReturnFirstResponse returns instance of CallConfig struct
type Client ¶
type Client interface { Get(ctx context.Context, uri string, opts ...CallOption) response.RPC Post(ctx context.Context, uri string, body *json.RawMessage) response.RPC Patch(ctx context.Context, uri string, body *json.RawMessage) response.RPC Delete(ctx context.Context, uri string) response.RPC }
Client ...
type ClientFactory ¶
ClientFactory ...
func NewClientFactory ¶
func NewClientFactory(t *config.URLTranslation) ClientFactory
NewClientFactory returns function definition for ClientFactory type
type ClientMock ¶
ClientMock helps to mock response APIs
func (*ClientMock) Get ¶
func (c *ClientMock) Get(ctx context.Context, uri string, opts ...CallOption) response.RPC
Get mocks response of GET APis
func (*ClientMock) Patch ¶
func (c *ClientMock) Patch(ctx context.Context, uri string, body *json.RawMessage) response.RPC
Patch mocks response of Patch APIs
func (*ClientMock) Post ¶
func (c *ClientMock) Post(ctx context.Context, uri string, body *json.RawMessage) response.RPC
Post mocks response of POST APIs
Click to show internal directories.
Click to hide internal directories.