Documentation ¶
Index ¶
- func Client(ctx context.Context) *common.APIClient
- func ClientFromContext(ctx context.Context) (*common.APIClient, bool)
- func NewConfiguration() *common.Configuration
- func NewDefaultContext(ctx context.Context) context.Context
- func SendRequest(ctx context.Context, method, url string, payload []byte) (*http.Response, []byte, error)
- func WithClient(ctx context.Context) context.Context
- func WithFakeAuth(ctx context.Context) context.Context
- func WithRecorder(ctx context.Context, t *testing.T) (context.Context, func())
- func WithTestAuth(ctx context.Context) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFromContext ¶
ClientFromContext returns client and indication if it was successful.
func NewConfiguration ¶
func NewConfiguration() *common.Configuration
NewConfiguration return configuration with known options.
func NewDefaultContext ¶
NewDefaultContext return context with detected values.
func SendRequest ¶
func SendRequest(ctx context.Context, method, url string, payload []byte) (*http.Response, []byte, error)
SendRequest sends request to endpoints without specification.
func WithClient ¶
WithClient sets client for unit tests in context.
func WithFakeAuth ¶
WithFakeAuth avoids issue of API returning `text/html` instead of `application/json`
func WithRecorder ¶
WithRecorder configures client with recorder.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.