handler

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseHTTPHandler

type BaseHTTPHandler struct {
	Logger *logger.Logger
}

BaseHTTPHandler base handler struct.

func (*BaseHTTPHandler) ResponseCSV

func (h *BaseHTTPHandler) ResponseCSV(c *gin.Context, statusCode int, fileName string, data []byte)

ResponseCSV responses csv data.

func (*BaseHTTPHandler) ResponseStatusBadRequest

func (h *BaseHTTPHandler) ResponseStatusBadRequest(c *gin.Context, messages interface{})

ResponseStatusBadRequest returns 400 error.

func (*BaseHTTPHandler) ResponseStatusForbidden

func (h *BaseHTTPHandler) ResponseStatusForbidden(c *gin.Context, messages interface{})

ResponseStatusForbidden returns 403 error.

func (*BaseHTTPHandler) ResponseStatusInternalServerError

func (h *BaseHTTPHandler) ResponseStatusInternalServerError(c *gin.Context, messages interface{}, err error)

ResponseStatusInternalServerError returns 500 error.

func (*BaseHTTPHandler) ResponseStatusNotFound

func (h *BaseHTTPHandler) ResponseStatusNotFound(c *gin.Context, messages interface{})

ResponseStatusNotFound returns 404 error.

func (*BaseHTTPHandler) ResponseZIP

func (h *BaseHTTPHandler) ResponseZIP(c *gin.Context, statusCode int, fileName string, mapContentFile map[string]bytes.Buffer) error

ResponseZIP responses zip data.

Jump to

Keyboard shortcuts

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