plugin

package
v0.0.0-...-8d2fcc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

func AggregateResults

func AggregateResults(c *CallConfig)

AggregateResults ...

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 CallOption

type CallOption func(*CallConfig)

CallOption ...

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

type ClientFactory func(name string) (Client, *errors.Error)

ClientFactory ...

func NewClientFactory

func NewClientFactory(t *config.URLTranslation) ClientFactory

NewClientFactory returns function definition for ClientFactory type

type ClientMock

type ClientMock struct {
	mock.Mock
}

ClientMock helps to mock response APIs

func (*ClientMock) Delete

func (c *ClientMock) Delete(ctx context.Context, uri string) response.RPC

Delete mocks response of Delete 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

type Collector

type Collector interface {
	Collect(response.RPC) error
	GetResult(context.Context) response.RPC
}

Collector ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL