Documentation ¶
Index ¶
- Constants
- func BinToDec(b string) string
- func BinToHex(b string) string
- func BinToOct(b string) string
- func DecToBin(b string) string
- func DecToHex(b string) string
- func DecToOct(d string) string
- func Download(url, dataDir string) (string, error)
- func HexToBin(b string) string
- func HexToDec(b string) string
- func HexToOct(b string) string
- func ImageEncode(image string) (string, string, error)
- func JWTdecode(tokenString string) (*jwt.Token, error)
- func MD5(input string) string
- func OctToBin(b string) string
- func OctToDec(b string) string
- func OctToHex(b string) string
- func SHA1(input string) string
- func SHA256(input string) string
- func SHA512(input string) string
- func TimeDuration(diff time.Duration) string
- type CheckSum
- type CheckSumer
- type Decode
- type Decoder
- type Encode
- type Encoder
- type JSONFormat
- type JSONFormater
Constants ¶
View Source
const ( Minute = 60 Hour = 60 * Minute Day = 24 * Hour Week = 7 * Day // https://www.unixtimestamp.com // https://www.jotform.com/help/443-mastering-date-and-time-calculation/ Month = 2629743 // 30.44 days Year = 31556926 // 365.24 days LongTime = 37 * Year )
Variables ¶
This section is empty.
Functions ¶
func TimeDuration ¶ added in v1.5.0
Types ¶
type CheckSumer ¶
func NewCheckSum ¶
func NewCheckSum(file string) (CheckSumer, error)
type Decoder ¶
type Decoder interface { Base64(input string) string URL(input string) string HTML(input string) string }
func NewDecoder ¶
func NewDecoder() Decoder
type Encoder ¶
type Encoder interface { Base64(input string) string URL(input string) string HTML(input string) string }
func NewEncoder ¶
func NewEncoder() Encoder
type JSONFormat ¶ added in v1.2.0
type JSONFormat struct { }
func (*JSONFormat) FourSpacesIndent ¶ added in v1.2.0
func (j *JSONFormat) FourSpacesIndent(s string) string
func (*JSONFormat) IsJSON ¶ added in v1.2.0
func (j *JSONFormat) IsJSON(s string) bool
func (*JSONFormat) Minify ¶ added in v1.2.0
func (j *JSONFormat) Minify(s string) string
func (*JSONFormat) TabIndent ¶ added in v1.2.0
func (j *JSONFormat) TabIndent(s string) string
func (*JSONFormat) TwoSpacesIndent ¶ added in v1.2.0
func (j *JSONFormat) TwoSpacesIndent(s string) string
type JSONFormater ¶ added in v1.2.0
type JSONFormater interface { TabIndent(string) string TwoSpacesIndent(string) string FourSpacesIndent(string) string Minify(string) string IsJSON(string) bool }
func NewJSONFormat ¶ added in v1.2.0
func NewJSONFormat() JSONFormater
Click to show internal directories.
Click to hide internal directories.