apiutil

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorBody

type ErrorBody struct {
	Message string `json:"message"`
}

ErrorBody represents an error used in response body

type Response

Response is returned from lambda proxy integration

func NewBinaryResponse added in v1.4.0

func NewBinaryResponse(code int, content []byte, contentType, disposition, filename string) Response

NewBinaryResponse returns a binary response. If filename is not empty, it will be used as the filename in the Content-Disposition header.

func NewErrorResponse

func NewErrorResponse(code int, message string) Response

NewErrorResponse returns an error response

func NewSuccessJSONResponse

func NewSuccessJSONResponse(body string) Response

NewSuccessJSONResponse returns a successful response

Jump to

Keyboard shortcuts

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