Documentation ¶
Index ¶
- Constants
- func BasicAuthDecode(encoded string) (string, string, error)
- func BasicAuthEncode(username, password string) string
- func Compress(infolder string, files []string, dest string) error
- func CopyDirFiles(src, dest string) error
- func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string
- func DateFormat(t time.Time, format string) string
- func DateParse(dateString, format string) (time.Time, error)
- func DeCompress(zipFile, dest string) error
- func EncodeMd5(str string) string
- func EncodeSHA256(str string) string
- func FileExist(filename string) bool
- func FileMd5(path string) (string, error)
- func FileSHA256(path string) (string, error)
- func FileSize(s int64) string
- func GetRandomString(n int, alphabets ...byte) string
- func InitInfrastructure(tempPrefix, encodeSecKey, timeFormat string)
- func SaveFileToTemp(fileName string, packageFile io.Reader) (string, error)
- func Subtract(left interface{}, right interface{}) interface{}
- func TimeSince(t time.Time) template.HTML
- func TimeSincePro(then time.Time) string
- func VerifyEmail(email string) bool
- func VerifyTimeLimitCode(data string, minutes int, code string) bool
- type ApiJsonError
- type IntentError
- type TplName
Constants ¶
View Source
const ( Minute = 60 Hour = 60 * Minute Day = 24 * Hour Week = 7 * Day Month = 30 * Day Year = 12 * Month )
View Source
const ( Byte = 1 KByte = Byte * 1024 MByte = KByte * 1024 GByte = MByte * 1024 TByte = GByte * 1024 PByte = TByte * 1024 EByte = PByte * 1024 )
View Source
const TimeLimitCodeLength = 12 + 6 + 40
Variables ¶
This section is empty.
Functions ¶
func BasicAuthEncode ¶
func CopyDirFiles ¶
func CreateTimeLimitCode ¶
func DateFormat ¶
Date takes a PHP like date func to Go's time format.
func DeCompress ¶
func EncodeSHA256 ¶
func FileSHA256 ¶
func GetRandomString ¶
func InitInfrastructure ¶
func InitInfrastructure(tempPrefix, encodeSecKey, timeFormat string)
func TimeSincePro ¶
func VerifyEmail ¶
Types ¶
type ApiJsonError ¶
type IntentError ¶
func MakeIntentError ¶
func MakeIntentError(err interface{}, code ...int) *IntentError
func (*IntentError) Error ¶
func (self *IntentError) Error() string
Click to show internal directories.
Click to hide internal directories.