rest

package
v0.0.80 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 17 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 (
	// 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) (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