echo

package
v0.3.25 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package echo contains API functionality for issuing echo requests to the API.

Index

Constants

View Source
const (
	// EchoPath can be used to test connectivity with the API.
	EchoPath = "/api/v1/test/echo.json"
)

Variables

View Source
var ErrInvalidEchoResponse = errors.New("invalid echo value received")

ErrInvalidEchoResponse indicates that an error request returned an invalid value.

Functions

func TestMock

func TestMock(t *testing.T) http.Handler

TestMock creates a new http.Handler that emulated the echo API endpoint.

Types

type API

type API interface {
	Echo(ctx context.Context) error
}

API contains methods for echo calls.

func NewAPI

func NewAPI(c client.Client) API

NewAPI creates a new echo API instance with the given client.

Jump to

Keyboard shortcuts

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