rest

package
v0.0.0-...-29cd555 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyResponse

func EmptyResponse(ctx *gin.Context)

func ErrorResponse

func ErrorResponse(ctx *gin.Context, code int, message string)

func SuccessResponse

func SuccessResponse(ctx *gin.Context, data interface{})

Types

type RestRouter

type RestRouter struct {
	// contains filtered or unexported fields
}

func NewRestRouter

func NewRestRouter(service *services.Service) *RestRouter

func (*RestRouter) InitRoutes

func (h *RestRouter) InitRoutes() *gin.Engine

func (*RestRouter) JWTAuthMiddleware

func (h *RestRouter) JWTAuthMiddleware(c *gin.Context)

type RestServer

type RestServer struct {
	// contains filtered or unexported fields
}

func NewRestServer

func NewRestServer(handler http.Handler) *RestServer

func (*RestServer) Run

func (h *RestServer) Run() error

func (*RestServer) Stop

func (h *RestServer) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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