Documentation ¶
Index ¶
- func AllowedHostsMiddleware() gin.HandlerFunc
- func Authenticator(f AuthAPIFunc) gin.HandlerFunc
- func ChangePasswordAPI() gin.HandlerFunc
- func CreateShortLinkAPI() gin.HandlerFunc
- func DeleteShortLinkAPI() gin.HandlerFunc
- func GetConfig(c *gin.Context)
- func GetShortLinkAPI() gin.HandlerFunc
- func GetUserInfoAPI() gin.HandlerFunc
- func JWTAuthenticatorMiddleware() gin.HandlerFunc
- func LandingHome(c *gin.Context)
- func ListShortLinksAPI() gin.HandlerFunc
- func Login(c *gin.Context)
- func LogoutAPI() gin.HandlerFunc
- func Redirect(c *gin.Context)
- func ShortLinkActionAPI() gin.HandlerFunc
- func UpdateIdLengthConfigAPI() gin.HandlerFunc
- func UpdateLandingHostsAPI() gin.HandlerFunc
- func UpdateShortLinkAPI() gin.HandlerFunc
- func UpdateShortLinkNotFoundConfigAPI() gin.HandlerFunc
- type AuthAPIFunc
- type LandingHostsParameter
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 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 ListShortLinksAPI ¶
func ListShortLinksAPI() gin.HandlerFunc
func LogoutAPI ¶
func LogoutAPI() gin.HandlerFunc
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 LandingHostsParameter ¶
type LandingHostsParameter struct {
Hosts []string `json:"hosts"`
}
Click to show internal directories.
Click to hide internal directories.