http

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeFile

func ServeFile(c *gin.Context, code int, filename string, content []byte)

ServeFile is a variation of the Gin Web Framework FileAttachment to support serving of a file for download from a []byte. https://github.com/gin-gonic/gin/blob/v1.10.0/context.go#L1097

Types

type PaginatedItemsResponse

type PaginatedItemsResponse struct {
	Items      json.RawMessage    `json:"items"`
	Pagination PaginationResponse `json:"pagination"`
}

type PaginationResponse added in v0.21.0

type PaginationResponse struct {
	Offset uint64 `json:"offset"`
	Limit  uint64 `json:"limit"`
	Total  int64  `json:"total"`
}

type ResponseInterceptor

type ResponseInterceptor struct {
	gin.ResponseWriter

	Rewrite bool
	// contains filtered or unexported fields
}

func (*ResponseInterceptor) GetBody

func (w *ResponseInterceptor) GetBody() []byte

func (*ResponseInterceptor) Intercept

func (w *ResponseInterceptor) Intercept(ctx *gin.Context)

func (*ResponseInterceptor) Stop

func (w *ResponseInterceptor) Stop(ctx *gin.Context)

func (*ResponseInterceptor) Write

func (w *ResponseInterceptor) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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