execute

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package execute sends the HTTP call for one operation.

Index

Constants

View Source
const DefaultMaxResponseBytes int64 = 1 << 20

DefaultMaxResponseBytes is 1 MiB when MaxBody is unset.

Variables

This section is empty.

Functions

func InvokeResponse

func InvokeResponse(ctx context.Context, cfg Client, op *catalog.Operation, params map[string]string) (*http.Response, error)

InvokeResponse runs one call and returns the HTTP response.

Types

type Client

type Client struct {
	BaseURL         string
	HTTP            *http.Client
	RecordBody      bool
	Auth            map[string]string
	Creds           *auth.Resolver
	FollowRedirects bool
	MaxBody         int64
	Fields          []string
	Limit           int
	Project         runtime.Projection
}

Client sends one operation over HTTP.

func (Client) Draft added in v0.1.1

func (c Client) Draft(ctx context.Context, op *catalog.Operation, params map[string]string) (runtime.HTTPRequest, error)

Draft is the upstream request without credentials, with secret values removed.

func (Client) FinishPages added in v0.1.6

func (c Client) FinishPages(status int, body string, truncated bool, p runtime.Projection) (result.HTTPResult, error)

FinishPages shapes a collected page walk. Runtime authorizes each page before this runs.

func (Client) InvokeHTTPResult

func (c Client) InvokeHTTPResult(ctx context.Context, op *catalog.Operation, params map[string]string) (result.HTTPResult, error)

type View

type View struct {
	Applied   bool
	Truncated bool
	Page      *result.Page
}

View is set when a successful body was projected.

Jump to

Keyboard shortcuts

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