handlers

package
v1.3.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedHostsMiddleware added in v1.2.0

func AllowedHostsMiddleware() gin.HandlerFunc

检查当前请求的 Host 是否属于我们所设定的 Host 列表中的其中一个 如果不在设定列表中,则返回 HTTP Code 400 并中断后续逻辑的处理

func Authenticator

func Authenticator(f AuthAPIFunc) gin.HandlerFunc

func ChangePasswordAPI

func ChangePasswordAPI() gin.HandlerFunc

func CreateShortLinkAPI

func CreateShortLinkAPI() gin.HandlerFunc

func DeleteShortLinkAPI

func DeleteShortLinkAPI() gin.HandlerFunc

func GetConfig

func GetConfig(c *gin.Context)

func GetShortLinkAPI

func GetShortLinkAPI() gin.HandlerFunc

func GetUserInfoAPI

func GetUserInfoAPI() gin.HandlerFunc

func JWTAuthenticatorMiddleware

func JWTAuthenticatorMiddleware() gin.HandlerFunc

func LandingHome added in v1.2.0

func LandingHome(c *gin.Context)

func ListShortLinksAPI

func ListShortLinksAPI() gin.HandlerFunc

func Login

func Login(c *gin.Context)

func LogoutAPI

func LogoutAPI() gin.HandlerFunc

func Redirect

func Redirect(c *gin.Context)

func ShortLinkActionAPI

func ShortLinkActionAPI() gin.HandlerFunc

func UpdateIdLengthConfigAPI added in v1.2.0

func UpdateIdLengthConfigAPI() gin.HandlerFunc

func UpdateLandingHostsAPI

func UpdateLandingHostsAPI() gin.HandlerFunc

func UpdateShortLinkAPI

func UpdateShortLinkAPI() gin.HandlerFunc

func UpdateShortLinkNotFoundConfigAPI added in v1.2.0

func UpdateShortLinkNotFoundConfigAPI() gin.HandlerFunc

Types

type AuthAPIFunc

type AuthAPIFunc func(c *gin.Context, user *models.User)

type LandingHostsParameter

type LandingHostsParameter struct {
	Hosts []string `json:"hosts"`
}

Jump to

Keyboard shortcuts

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