ingress

package
v0.175.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRequestBody added in v0.117.0

func BuildRequestBody(route *dal.IngressRoute, r *http.Request, sch *schema.Schema) ([]byte, error)

BuildRequestBody extracts the HttpRequest body from an HTTP request.

func GetIngressRoute

func GetIngressRoute(routes []dal.IngressRoute, method string, path string) (*dal.IngressRoute, error)

func Handle added in v0.139.1

Handle HTTP ingress routes.

func ResponseForVerb added in v0.122.0

func ResponseForVerb(sch *schema.Schema, verb *schema.Verb, response HTTPResponse) ([]byte, http.Header, error)

ResponseForVerb returns the HTTP response for a given verb.

func ValidateCallBody added in v0.82.0

func ValidateCallBody(body []byte, ref *schema.Ref, sch *schema.Schema) error

Types

type HTTPResponse added in v0.122.0

type HTTPResponse struct {
	Status  int                 `json:"status,omitempty"`
	Headers map[string][]string `json:"headers,omitempty"`
	Body    json.RawMessage     `json:"body,omitempty"`
	Error   json.RawMessage     `json:"error,omitempty"`
}

HTTPResponse mirrors builtins.HttpResponse.

Jump to

Keyboard shortcuts

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