rest

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToContext

func AddToContext(ctx context.Context, request *events.APIGatewayProxyRequest) context.Context

AddToContext adds request data to context

func Response

func Response(ctx context.Context, status int, request *events.APIGatewayProxyRequest, body interface{}) *events.APIGatewayProxyResponse

func ResponseError

func ResponseError(ctx context.Context, status int, request *events.APIGatewayProxyRequest, err error) *events.APIGatewayProxyResponse

func ResponseRaw

func ResponseRaw(ctx context.Context, status int, body string) *events.APIGatewayProxyResponse

Types

type ErrorBody

type ErrorBody struct {
	Message     string `json:"message"`
	Method      string `json:"method"`
	Path        string `json:"path"`
	RequestID   string `json:"requestId"`
	RequestTime string `json:"requestTime"`
}

type Patch

type Patch struct {
	OP    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value"`
}

type PatchRequest

type PatchRequest []Patch

Jump to

Keyboard shortcuts

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