clients

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayHTTPClient

type GatewayHTTPClient interface {
	Get(ctx context.Context, path string) RequestBuilder
	Head(ctx context.Context, path string) RequestBuilder
	Post(ctx context.Context, path string) RequestBuilder
	Put(ctx context.Context, path string) RequestBuilder
	Patch(ctx context.Context, path string) RequestBuilder
	Delete(ctx context.Context, path string) RequestBuilder
}

func NewGatewayHTTPClient

func NewGatewayHTTPClient(
	address string,
	ip ident.Provider,
	kr keyring.Keyring,
) (GatewayHTTPClient, error)

type RequestBuilder

type RequestBuilder interface {
	// Sets a request header
	Header(key, value string) RequestBuilder
	// Sets the request body
	Body(body []byte) RequestBuilder

	// Sends the request
	Send() (code int, body []byte, err error)
}

Jump to

Keyboard shortcuts

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