Documentation ¶
Index ¶
- Constants
- Variables
- func FindAddress(ctx context.Context, ip string) (string, error)
- func FormatDatetime(timestamp int64) 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 NewKey(prefix string, length int, ids ...string) string
- func RenderTemplate(data any) (string, error)
- func ToMap[T any, K int | string](arr []T, fn func(T) K) map[K]T
- func Unique[T IntInterface | string](data []T) []T
- 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 DateTime
- type IntInterface
- type IpAddressResponse
Constants ¶
View Source
const ( DATE_TIME_FORMAT = "2006-01-02 15:04:05" DATE_MINUTE_FORMAT = "2006-01-02 15:04" DATE_FORMAT = "2006-01-02" )
Variables ¶
View Source
var Location *time.Location
Functions ¶
func FormatDatetime ¶
func GenerateId ¶
func GenerateId() string
func HttpDownloadFile ¶
func HttpPostJson ¶
func RenderTemplate ¶
func WebSocketClient ¶
Types ¶
type DateTime ¶
type DateTime struct { StartTimestamp int64 EndTimestamp int64 StartDate string StartDateTime string EndDate string EndDateTime string }
func MinuteRange ¶
type IntInterface ¶
type IpAddressResponse ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.