http

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName is provider name for install.
	ProviderName = "http"
)

Variables

This section is empty.

Functions

func GetProviders

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders returns the providers

func GetTemplate

func GetTemplate() string

GetTemplate returns the cue template

Types

type DoParams

DoParams is the params for http request

type RateLimiter

type RateLimiter struct {
	Limit  int    `json:"limit"`
	Period string `json:"period"`
}

RateLimiter .

type Request

type Request struct {
	Timeout     string            `json:"timeout,omitempty"`
	Body        string            `json:"body,omitempty"`
	Header      map[string]string `json:"header,omitempty"`
	Trailer     map[string]string `json:"trailer,omitempty"`
	RateLimiter *RateLimiter      `json:"rateLimiter,omitempty"`
}

Request .

type RequestVars

type RequestVars struct {
	Method    string     `json:"method"`
	URL       string     `json:"url"`
	Request   *Request   `json:"request,omitempty"`
	TLSConfig *TLSConfig `json:"tls_config,omitempty"`
}

RequestVars is the vars for http request

type ResponseVars

type ResponseVars struct {
	Body       string      `json:"body"`
	Header     http.Header `json:"header,omitempty"`
	Trailer    http.Header `json:"trailer,omitempty"`
	StatusCode int         `json:"statusCode"`
}

ResponseVars is the vars for http response

func Do

func Do(ctx context.Context, params *DoParams) (*ResponseVars, error)

Do process http request.

type TLSConfig

type TLSConfig struct {
	Secret    string `json:"secret"`
	Namespace string `json:"namespace,omitempty"`
}

TLSConfig .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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