com

package module
v0.0.0-...-318339d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 14 Imported by: 14

README

GolangCI

FOSSA Status

Documentation

Index

Constants

View Source
const HolidayGov = 3

HolidayGov 法定节假日

View Source
const HolidayOvertimeWork = 0

HolidayOvertimeWork 法定加班

View Source
const HolidayWeekend = 2

HolidayWeekend 周末

View Source
const HolidayWorkingDay = 1

HolidayWorkingDay 工作日

Variables

This section is empty.

Functions

func AESGCMDecrypt

func AESGCMDecrypt(key, ciphertext []byte) ([]byte, error)

AESGCMDecrypt decrypts ciphertext with the given key using AES in GCM mode.

func AESGCMEncrypt

func AESGCMEncrypt(key, plaintext []byte) ([]byte, error)

AESGCMEncrypt encrypts plaintext with the given key using AES in GCM mode.

func Downloader

func Downloader(url, save string) error

Downloader simple http downloader

func IsDomain

func IsDomain(domain string) bool

IsDomain is valid domain

func IsHoliday

func IsHoliday(t time.Time) int

IsHoliday 中国法定节假日

func IsIPv4

func IsIPv4(ipv4 string) bool

IsIPv4 is valid ipv4

func IsWeekend

func IsWeekend(t time.Time) bool

IsWeekend 周末判断

func MD5

func MD5(text string) string

MD5 md5 encrypt

func RandomIP

func RandomIP() string

RandomIP get a random ip address

func RandomString

func RandomString(n int) string

RandomString get a random string

func RandomUserAgent

func RandomUserAgent() string

RandomUserAgent get a random user-agent

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL