Documentation ¶
Index ¶
- Constants
- func AbortWithError(c *gin.Context, err error)
- func AbortWithStatusAndError(c *gin.Context, status int, err error)
- func FindHash(c *gin.Context) string
- func GetZapLogLevel(err error) zapcore.Level
- func Response(c *gin.Context, httpCode int, data interface{})
- func ResponseWithError(c *gin.Context, err error)
- func ResponseWithStatusAndError(c *gin.Context, status int, err error)
- type Interactor
- type Middleware
Constants ¶
View Source
const (
CookieSession = "__sess__"
)
View Source
const (
KeyUser = "gitploy.user"
)
Gin context values.
Variables ¶
This section is empty.
Functions ¶
func AbortWithError ¶
func AbortWithStatusAndError ¶
AbortWithStatusAndError overrides the HTTP status.
func GetZapLogLevel ¶
GetZapLogLevel return the warning level if the error is managed in the system.
func ResponseWithError ¶
Types ¶
type Interactor ¶
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
Click to show internal directories.
Click to hide internal directories.