http

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequestMetadata

func GetRequestMetadata(c *gin.Context) *models.Request

GetRequestMetadata returns the request metadata

[param] c | *gin.Context: gin context

[return] *models.Request: request metadata

func MultipartToBytes

func MultipartToBytes(c *gin.Context, key string) ([]byte, error)

MultipartToBytes reads a file from a multipart request

[param] c | *gin.Context: gin context [param] key | string: key of the file

[return] []byte: file bytes

func ReadBodyJson

func ReadBodyJson(params interface{}, obj interface{}) error

Read body json as the given object

[param] c | interface: gin context [param] obj | interface{}: object to read

[return] error: error

func SendResponse

func SendResponse(c *gin.Context, status int, response gin.H)

Types

This section is empty.

Jump to

Keyboard shortcuts

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