http

package
v0.0.0-...-6d513be Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailedResponse

func FailedResponse(c *gin.Context, msg string)

func NewResponse

func NewResponse(c *gin.Context, code int, msg string, data interface{})

func NewServer

func NewServer(handler http.Handler) *http.Server

NewServer returns a new server with sane defaults.

func SuccessResponse

func SuccessResponse(c *gin.Context, msg string, data interface{})

Types

type HttpServer

type HttpServer struct {
}

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	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