Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinByFormat ¶
JoinByFormat joins a string array by a known format:
csv: comma separated value (default) ssv: space separated value tsv: tab separated value pipes: pipe (|) separated value
Types ¶
type Client ¶
type Client interface { // DeleteBook makes a DELETE request to /books/{id}. DeleteBook(ctx context.Context, i *models.DeleteBookInput) error }
Client defines the methods available to clients of the swagger-test service.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
Mock of Client interface
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
func (*MockClient) DeleteBook ¶
func (_m *MockClient) DeleteBook(ctx context.Context, i *models.DeleteBookInput) error
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *_MockClientRecorder
type WagClient ¶
type WagClient struct {
// contains filtered or unexported fields
}
WagClient is used to make requests to the swagger-test service.
func NewFromDiscovery ¶
NewFromDiscovery creates a client from the discovery environment variables. This method requires the three env vars: SERVICE_SWAGGER_TEST_HTTP_(HOST/PORT/PROTO) to be set. Otherwise it returns an error.
func (*WagClient) DeleteBook ¶
DeleteBook makes a DELETE request to /books/{id}.
func (*WagClient) WithRetries ¶
WithRetries returns a new client that retries all GET operations until they either succeed or fail the number of times specified.
func (*WagClient) WithTimeout ¶
WithTimeout returns a new client that has the specified timeout on all operations. To make a single request have a timeout use context.WithTimeout as described here: https://godoc.org/golang.org/x/net/context#WithTimeout.