Documentation
¶
Index ¶
- Variables
- func AesDecrypt(cipherText, secret string) (string, error)
- func AesEncrypt(plaintext, secret string) (string, error)
- func Int64Left(value int64, length int, pad string) string
- func IntLeft(value int, length int, pad string) string
- func Left(str string, length int, pad string) string
- func Right(str string, length int, pad string) string
- type Clock
- type TimeUtil
- func (t *TimeUtil) GetTimeStampByLayout(timeStr, layout string) (int64, error)
- func (t TimeUtil) Now() time.Time
- func (t *TimeUtil) ToDayString() string
- func (t *TimeUtil) ToMonthString() string
- func (t *TimeUtil) ToUtcTime(timestamp int64) time.Time
- func (t *TimeUtil) ToWeekString() string
- func (t *TimeUtil) ToYearDayString() string
- func (t *TimeUtil) ToYearString() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSecretTooShort = errors.New("secret is too short, length must be 16/24/32") ErrCipherTooShort = errors.New("ciphertext is too short") )
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
Types ¶
type TimeUtil ¶
type TimeUtil struct {
// contains filtered or unexported fields
}
func NewTimeUtil ¶
func NewTimeUtil() TimeUtil
func NewTimeUtilWithTime ¶
func (*TimeUtil) GetTimeStampByLayout ¶
func (*TimeUtil) ToDayString ¶
func (*TimeUtil) ToMonthString ¶
func (*TimeUtil) ToWeekString ¶
func (*TimeUtil) ToYearDayString ¶
func (*TimeUtil) ToYearString ¶
Click to show internal directories.
Click to hide internal directories.