framework

package
v0.0.0-...-8217cab Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateStruct

func ValidateStruct(v interface{}) error

Types

type AuthResponse

type AuthResponse struct {
	UserInfo     GoAuthUserInfo `json:"user_info,omitempty"`
	AccessToken  string         `json:"access_token"`
	RefreshToken string         `json:"refresh_token"`
	SessionToken string         `json:"session_token,omitempty"`
}

type Echo

type Echo interface {
	Login(c echo.Context) error
	Register(c echo.Context) error
	Logout(c echo.Context) error
	GoogleLogin(c echo.Context) error
	GoogleCallback(c echo.Context) error
	GithubLogin(c echo.Context) error
	GithubCallback(c echo.Context) error
}

type FastHTTP

type FastHTTP interface {
	Login(ctx *fasthttp.RequestCtx)
	Register(ctx *fasthttp.RequestCtx)
	Logout(ctx *fasthttp.RequestCtx)
	GoogleLogin(ctx *fasthttp.RequestCtx)
	GoogleCallback(ctx *fasthttp.RequestCtx)
	GithubLogin(ctx *fasthttp.RequestCtx)
	GithubCallback(ctx *fasthttp.RequestCtx)
}

type Fiber

type Fiber interface {
	Login(c fiber.Ctx) error
	Register(c fiber.Ctx) error
	Logout(c fiber.Ctx) error
	GoogleLogin(c fiber.Ctx) error
	GoogleCallback(c fiber.Ctx) error
	GithubLogin(c fiber.Ctx) error
	GithubCallback(c fiber.Ctx) error
	Me(c fiber.Ctx) error
}

type Gin

type Gin interface {
	Login(ctx *gin.Context)
	Register(ctx *gin.Context)
	Logout(ctx *gin.Context)
	GoogleLogin(ctx *gin.Context)
	GoogleCallback(ctx *gin.Context)
	GithubLogin(ctx *gin.Context)
	GithubCallback(ctx *gin.Context)
}

type GoAuthUserInfo

type GoAuthUserInfo struct {
	UserId   string    `json:"user_id"`
	Email    string    `json:"email"`
	Username string    `json:"username"`
	CreateAt time.Time `json:"create_at"`
}

type HTTP

type HTTP interface {
	Login(w http.ResponseWriter, r *http.Request)
	Register(w http.ResponseWriter, r *http.Request)
	Logout(w http.ResponseWriter, r *http.Request)
	GoogleLogin(w http.ResponseWriter, r *http.Request)
	GoogleCallback(w http.ResponseWriter, r *http.Request)
	GithubLogin(w http.ResponseWriter, r *http.Request)
	GithubCallback(w http.ResponseWriter, r *http.Request)
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type RegisterRequest

type RegisterRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Name     string `json:"user_name,omitempty"`
	RoleName string `json:"role_name,omitempty"`
	Image    string `json:"image,omitempty"`
}

type RegisterResponse

type RegisterResponse struct{}

Directories

Path Synopsis
echo
gin

Jump to

Keyboard shortcuts

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