server

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortWithError

func AbortWithError(c *gin.Context, err error)

func DiInjectorMiddleware

func DiInjectorMiddleware() gin.HandlerFunc

func ErrorHandler

func ErrorHandler(c *gin.Context)

func GinDi

func GinDi(c *gin.Context) di.Injector

func HeaderAuthorization

func HeaderAuthorization(c *gin.Context) (string, error)

HeaderAuthorization token string from Authorization header

func HeaderToken

func HeaderToken(c *gin.Context) *token.Token

HeaderToken Token data from Authorization header

func IsAdminMiddleware

func IsAdminMiddleware(c *gin.Context)

Gin middleware to validate user token and Admin Access

func IsAuthenticatedMiddleware

func IsAuthenticatedMiddleware(c *gin.Context)

Gin middleware to validate logged in user token

func Router

func Router() *gin.Engine

Types

type ErrorData

type ErrorData struct {
	Error string `json:"error"`
}

Jump to

Keyboard shortcuts

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