Documentation
¶
Index ¶
- Constants
- type AuthKey
- type AuthService
- type AuthServiceParam
- type AuthedGroutRoute
- func NewAuthedRouter(route *gin.Engine, auth *AuthService, logger *zap.Logger, base string, ...) AuthedGroutRoute
- func NewDefaultAuthedRouter(route *gin.Engine, auth *AuthService, logger *zap.Logger) AuthedGroutRoute
- func NewRouterRequiredAuth(group *gin.RouterGroup, auth *AuthService) AuthedGroutRoute
Constants ¶
View Source
const (
KeyUser = "currentUser"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct { Db *gorm.DB // SQL string Keys []string // contains filtered or unexported fields }
func (*AuthService) Auth ¶
func (a *AuthService) Auth(c *gin.Context)
func (*AuthService) CreateUser ¶ added in v0.1.7
func (a *AuthService) CreateUser(owner, remark string) (string, error)
type AuthServiceParam ¶ added in v0.0.8
type AuthedGroutRoute ¶ added in v0.1.6
func NewAuthedRouter ¶ added in v0.1.6
func NewAuthedRouter(route *gin.Engine, auth *AuthService, logger *zap.Logger, base string, replyCode int) AuthedGroutRoute
func NewDefaultAuthedRouter ¶ added in v0.1.6
func NewDefaultAuthedRouter(route *gin.Engine, auth *AuthService, logger *zap.Logger) AuthedGroutRoute
func NewRouterRequiredAuth ¶ added in v0.0.8
func NewRouterRequiredAuth(group *gin.RouterGroup, auth *AuthService) AuthedGroutRoute
Click to show internal directories.
Click to hide internal directories.