Documentation ¶
Index ¶
- Constants
- Variables
- func Init(app *fiber.App, db *sql.DB) error
- func RequiresValidAccessToken(handler FiberClaimsHandler) common.FiberHandler
- func T_Login_fail(t *testing.T, app *fiber.App, r LoginRequest) (int, common.OutboundErrResponse)
- type ChangePasswordRequest
- type ChangePasswordResponse
- type ClaimsHttpHandler
- type FiberClaimsHandler
- type LoginRequest
- type LoginResponse
- type RefreshTokenResponse
- type RegisterNewUserRequest
- type RegisterNewUserResponse
- type User
- type UserModel
Constants ¶
View Source
const (
UserTable = "user"
)
Variables ¶
View Source
var UserModelStruct = sqlbuilder.NewStruct(new(UserModel))
Functions ¶
func RequiresValidAccessToken ¶
func RequiresValidAccessToken(handler FiberClaimsHandler) common.FiberHandler
func T_Login_fail ¶ added in v0.11.0
func T_Login_fail(t *testing.T, app *fiber.App, r LoginRequest) (int, common.OutboundErrResponse)
Types ¶
type ChangePasswordRequest ¶ added in v0.9.0
type ChangePasswordRequest struct {
NewPassword string `json:"new_password"`
}
type ChangePasswordResponse ¶ added in v0.9.0
type ChangePasswordResponse struct {
Success bool `json:"success"`
}
func T_ChangePassword_ok ¶ added in v0.11.0
func T_ChangePassword_ok(t *testing.T, app *fiber.App, r ChangePasswordRequest, o commontest.AuthOpts) (int, ChangePasswordResponse)
type ClaimsHttpHandler ¶
type FiberClaimsHandler ¶ added in v0.5.0
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { Username string `json:"username,omitempty"` AccessToken string `json:"access_token,omitempty"` RefreshToken string `json:"refresh_token,omitempty"` }
func T_Login_ok ¶ added in v0.11.0
func T_Login_ok(t *testing.T, app *fiber.App, r LoginRequest) (int, LoginResponse)
type RefreshTokenResponse ¶
type RegisterNewUserRequest ¶
type RegisterNewUserResponse ¶
type RegisterNewUserResponse struct {
Success bool `json:"success"`
}
func T_RegisterUser ¶ added in v0.11.0
func T_RegisterUser(t *testing.T, app *fiber.App, r RegisterNewUserRequest) (int, RegisterNewUserResponse)
Click to show internal directories.
Click to hide internal directories.