Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaximumImageSize = 10 * 1024 * 1024 AllowedUploadsPerMinute = 100 RequestInterval = time.Minute )
Variables ¶
This section is empty.
Functions ¶
func GetIDHandler ¶
func HandleIpupdate ¶
func UploadBase64ImageHandler ¶
func UploadBase64ImageHandler(rateLimiter *RateLimiter) gin.HandlerFunc
闭包,网页后端,图床逻辑,基于gin和www静态文件的简易图床
func UploadBase64RecordHandler ¶
func UploadBase64RecordHandler(rateLimiter *RateLimiter) gin.HandlerFunc
闭包,网页后端,语音床逻辑,基于gin和www静态文件的简易语音床
Types ¶
type RateLimiter ¶
func (*RateLimiter) CheckAndUpdateRateLimit ¶
func (rl *RateLimiter) CheckAndUpdateRateLimit(ipAddress string) bool
检查是否超过调用频率限制
Click to show internal directories.
Click to hide internal directories.