Help us shape the future of Go! Take the 2026 Go Developer Survey

rest

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package rest implements a REST data source.

The REST data source is a data source that can be used to fetch data from a REST API. The data source is defined in the Minder API as a REST data source definition. The definition contains a set of handlers that define how to fetch data from the REST API.

It gives the caller a simple structured output to represent the result of the REST call.

An example of the output is:

{
  "status_code": 200,
  "body": {
    "key": "value"
  }
}

Index

Constants

View Source
const (
	// DefaultRequestTimeout is the default timeout for REST data source requests.
	DefaultRequestTimeout = 5 * time.Second
	// MaxBytesLimit is the maximum number of bytes to read from the response body
	// We limit to 1MB to prevent abuse
	MaxBytesLimit int64 = 1 << 20
)

Variables

This section is empty.

Functions

func NewRestDataSource

func NewRestDataSource(
	rest *minderv1.RestDataSource,
	provider provinfv1.Provider,
	opts ...v1datasources.Option,
) (v1datasources.DataSource, error)

NewRestDataSource builds a new REST data source.

Types

This section is empty.

Jump to

Keyboard shortcuts

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