Documentation ¶
Index ¶
- Constants
- Variables
- func Delete(slice []string, index int) (newSlice []string)
- func Desensitize(input string, keep ...int) string
- func ExcelExport(sheetName string, titleCols []string, colFieldMap map[string]string, ...) error
- func FindAddress(ctx context.Context, ip string) (string, error)
- func FormatDateTime(timestamp int64) string
- func FormatDateTimeMonth(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 PriceConv(ratio float64) float64
- func QuotaConv(quota int) float64
- func RenderTemplate(data any) (string, error)
- func Round(f float64, n int) float64
- 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_TIME_MONTH_FORMAT = "01-02 15:04:05" DATE_MINUTE_FORMAT = "2006-01-02 15:04" DATE_FORMAT = "2006-01-02" )
View Source
const COL_A = 65
Variables ¶
View Source
var Location *time.Location
Functions ¶
func ExcelExport ¶ added in v0.5.0
func FormatDateTime ¶ added in v0.2.0
func FormatDateTimeMonth ¶ added in v0.2.0
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 ¶
Click to show internal directories.
Click to hide internal directories.