Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaximumImageSize = 10 * 1024 * 1024 AllowedUploadsPerMinute = 100 RequestInterval = time.Minute )
Variables ¶
This section is empty.
Functions ¶
func GetIDHandler ¶
func WsHandlerWithDependencies ¶
func WsHandlerWithDependencies(Token string, BaseUrl string, p *Processor.Processors) gin.HandlerFunc
使用闭包结构 因为gin需要c *gin.Context固定签名
Types ¶
type RateLimiter ¶
func (*RateLimiter) CheckAndUpdateRateLimit ¶
func (rl *RateLimiter) CheckAndUpdateRateLimit(ipAddress string) bool
检查是否超过调用频率限制
type WebSocketServerClient ¶
func (*WebSocketServerClient) Close ¶
func (client *WebSocketServerClient) Close() error
func (*WebSocketServerClient) SendMessage ¶
func (c *WebSocketServerClient) SendMessage(message map[string]interface{}) error
发信息给client
Click to show internal directories.
Click to hide internal directories.