httputilsinterfaces

package
v0.414.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	DownloadAsFile(ctx context.Context, downloadOptions *httputilsparameteroptions.DownloadAsFileOptions) (downloadedFile filesinterfaces.File, err error)
	DownloadAsTemporaryFile(ctx context.Context, downloadOptions *httputilsparameteroptions.DownloadAsFileOptions) (downloadedFile filesinterfaces.File, err error)
	SendRequest(ctx context.Context, requestOptions *httputilsparameteroptions.RequestOptions) (response Response, err error)
	SendRequestAndGetBodyAsString(ctx context.Context, requestOptions *httputilsparameteroptions.RequestOptions) (responseBody string, err error)
	SendRequestAndRunYqQueryAgainstBody(ctx context.Context, requestOptions *httputilsparameteroptions.RequestOptions, query string) (result string, err error)
}

type Response

type Response interface {
	CheckStatusCode(expectedStatusCode int) error
	GetBodyAsString() (body string, err error)
	IsStatusCode(expectedStatusCode int) bool
	IsStatusCode200Ok() bool
	SetBody(body []byte) (err error)
	SetStatusCode(statusCode int) (err error)
	RunJqQueryAgainstBody(query string) (result string, err error)
	RunYqQueryAgainstBody(query string) (result string, err error)
}

type Server

type Server interface {
	GetPort() (port int, err error)
	StartInBackground(ctx context.Context) (err error)
	Stop(ctx context.Context) (err error)
}

Jump to

Keyboard shortcuts

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