httpservice

package
v0.0.0-...-2d47b1e Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(c *gin.Context, err any)

func InitRouter

func InitRouter() *gin.Engine

func Start

func Start()

func StructuredLogger

func StructuredLogger() gin.HandlerFunc

StructuredLogger logs a gin HTTP request in JSON format. Allows to set the logger for testing purposes.

Types

type HttpResponse

type HttpResponse struct {
	Message string      `json:"msg"`
	Code    int         `json:"code"`
	Data    interface{} `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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