Versions in this module Expand all Collapse all v0 v0.4.0 Mar 11, 2019 Changes in this version + const DateFmtLong + const DateFmtNumeric + const ErrBadRequest + const ErrDataExists + const ErrDataNotFound + const ErrDataValidate + const ErrException + const ErrMethodNotAllowed + const ErrNotAllowed + const ErrNotFound + const ErrOk + const ErrParamsError + const ErrUnAuthorized + const HTTPHeaderAuthorization + const HTTPHeaderToken + const LibName + const LibVersion + const TimeFmtLong + const TimeFmtNumeric + const VarUserAuthorization + func CheckCharYesNo(s string) bool + func CheckIntRange(n, min, max int) bool + func CheckStringLength(s string, min, max int) bool + func CloseDefaultLogger() error + func GetAesCryptoKey() string + func IsDate(s string) bool + func IsHexString(s string) bool + func IsTime(s string) bool + func IsWeekEnd(d time.Weekday) bool + func LogDebug(v ...interface{}) + func LogInfo(v ...interface{}) + func MD5(data string) string + func SHA1(data string) string + func SHA256(data string) string + func SHA512(data []byte) ([]byte, error) + func SetAesCryptoKey(password string) + func Str2Date(s string) (t time.Time, err error) + func Str2Time(s string) (t time.Time, err error) + func StrFmtTime(s, fmt string) (t time.Time, err error) + func StrLen(s string) int + func Time2Str(t time.Time) string + func TimeFmtStr(t time.Time, fmt string) string + type AesCrypto struct + Key []byte + func NewAesCrypto() *AesCrypto + func (a *AesCrypto) Decrypt(crypted []byte) ([]byte, error) + func (a *AesCrypto) Encrypt(origData []byte) ([]byte, error) + func (a *AesCrypto) SetKey(key string) + type Logger struct + FP *os.File + Log *log.Logger + func NewDefaultLogger(path string) (*Logger, error) + func NewLogger(path string) (logger *Logger, err error) + func ReopenDefaultLogger(path string) (*Logger, error) + func (logger Logger) Close() error + func (logger Logger) Debug(v ...interface{}) + func (logger Logger) Info(v ...interface{}) + type ReplyData struct + Data interface{} + Errs map[string]string + List interface{} + Message string + PageCount int + Status int + Total int + func ErrReplyData(status int, message string) *ReplyData + func ErrorsReplyData(status int, errors map[string]string) *ReplyData + func NewReplyData(status int) *ReplyData + func OkReplyData() *ReplyData + func RowReplyData(row interface{}) *ReplyData + func RowsReplyData(total, pageCount int, rows interface{}) *ReplyData