Documentation ¶
Index ¶
- Variables
- func AuthMiddleware(auto401 bool) gin.HandlerFunc
- func UpdateContextUserModel(c *gin.Context, my_user_id uint)
- func UserLogin(c *gin.Context)
- func UserRegistration(c *gin.Context)
- func UsersRegister(router *gin.RouterGroup)
- type LoginValidator
- type UserModel
- type UserModelValidator
- type UserResponse
- type UserSerializer
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthorizationHeaderExtractor = &request.PostExtractionFilter{ request.HeaderExtractor{"Authorization"}, stripBearerPrefixFromTokenString, }
View Source
var MyAuth2Extractor = &request.MultiExtractor{ AuthorizationHeaderExtractor, request.ArgumentExtractor{"access_token"}, }
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(auto401 bool) gin.HandlerFunc
func UpdateContextUserModel ¶
func UserRegistration ¶
func UsersRegister ¶
func UsersRegister(router *gin.RouterGroup)
Types ¶
type LoginValidator ¶
type UserModelValidator ¶
type UserModelValidator struct { User struct { Username string `form:"username" json:"username"` Email string `form:"email" json:"email"` Password string `form:"password" json:"password"` Bio string `form:"bio" json:"bio"` Image string `form:"image" json:"image"` } `json:"user"` // contains filtered or unexported fields }
type UserResponse ¶
type UserSerializer ¶
type UserSerializer struct {
// contains filtered or unexported fields
}
func (*UserSerializer) Response ¶
func (self *UserSerializer) Response() UserResponse
Click to show internal directories.
Click to hide internal directories.