Documentation ¶
Index ¶
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenFileName ¶
func GenerateId ¶
func GenerateId() string
func HttpDownloadFile ¶
func HttpPostJson ¶
func NewSecretKey ¶
func WebSocketClient ¶
Types ¶
type RoundRobin ¶
type RoundRobin struct {
CurIndex int
}
func (*RoundRobin) RoundRobin ¶
func (roundRobin *RoundRobin) RoundRobin(values []string) (value string)
轮询模式
Click to show internal directories.
Click to hide internal directories.