Help us shape the future of Go! Take the 2026 Go Developer Survey

global

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieSession = "__sess__"
)
View Source
const (
	KeyUser = "gitploy.user"
)

Gin context values.

Variables

This section is empty.

Functions

func AbortWithError

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

func AbortWithStatusAndError

func AbortWithStatusAndError(c *gin.Context, status int, err error)

AbortWithStatusAndError overrides the HTTP status.

func FindHash

func FindHash(c *gin.Context) string

func GetZapLogLevel

func GetZapLogLevel(err error) zapcore.Level

GetZapLogLevel return the warning level if the error is managed in the system.

func Response

func Response(c *gin.Context, httpCode int, data interface{})

func ResponseWithError

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

func ResponseWithStatusAndError

func ResponseWithStatusAndError(c *gin.Context, status int, err error)

ResponseWithStatusAndError overrides the HTTP status.

Types

type Interactor

type Interactor interface {
	FindUserByHash(ctx context.Context, hash string) (*ent.User, error)
}

type Middleware

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

func NewMiddleware

func NewMiddleware(i Interactor) *Middleware

func (*Middleware) SetUser

func (s *Middleware) SetUser() gin.HandlerFunc

Jump to

Keyboard shortcuts

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