Versions in this module Expand all Collapse all v1 v1.1.0 Nov 12, 2023 Changes in this version + func BoolToInt(value bool) int + func GenFileName(ext string) string + func GenImageName(ext string, width, height int) string + func GenValidateCode(length int) string + func GenerateId() string + func HttpDownloadFile(ctx context.Context, fileURL string, proxyURL ...string) []byte + func HttpGet(ctx context.Context, url string, header map[string]string, data g.Map, ...) error + func HttpPost(ctx context.Context, url string, header map[string]string, ...) error + func HttpPostJson(ctx context.Context, url string, header map[string]string, ...) error + func NewMsgId() string + func NewSecretKey(userId, length int, prefix ...string) string + func Random(length int) string + func SSEServer(ctx context.Context, event string, content any) error + func WebSocketClient(ctx context.Context, wsURL string, messageType int, message []byte, ...) (*websocket.Conn, error) + func WebSocketClientOnlyReceive(ctx context.Context, wsURL string, result chan []byte, proxyURL ...string) (*websocket.Conn, error) + type RoundRobin struct + CurIndex int + func (roundRobin *RoundRobin) RoundRobin(values []string) (value string)