Documentation ¶
Index ¶
- Variables
- func CalcExpiry(days int) string
- func CheckToken(secret, expiry, input, token string) error
- func DaysBetween(start, end time.Time) []time.Time
- func DiffOnly(one, two string) string
- func FirstChar(input string) string
- func FirstFiveChars(input string) string
- func FirstNonEmptyString(inputs ...string) string
- func GetTxCtx(db *sql.DB) (context.Context, *sql.Tx, error)
- func Hash(str string) string
- func HashPassword(rawpassword string) (string, error)
- func IsBetween(target, start, end time.Time) bool
- func IsWeekday(day time.Time) bool
- func IsWeekend(day time.Time) bool
- func NextDay(begin time.Time, target time.Weekday) time.Time
- func Parallelize(functions ...func() error) (errors []error)
- func Prefix(strs []string, prefix string) []string
- func PrettyJsonString(input string) string
- func RollbackTx(ctx context.Context) error
- func StripBlankStrings(input []string) []string
- func Uniq(input []string) []string
- type ClientSafeError
- type IntMap
- type Period
- type StringMap
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var Diff = diff.Diff
View Source
var ErrorTokenExpired = fmt.Errorf("Token expired")
View Source
var ErrorTokenInvalid = fmt.Errorf("Token invalid")
Functions ¶
func CalcExpiry ¶
func CheckToken ¶
func FirstFiveChars ¶
func FirstNonEmptyString ¶
func HashPassword ¶
func Parallelize ¶
func PrettyJsonString ¶
func RollbackTx ¶
func StripBlankStrings ¶
Types ¶
type ClientSafeError ¶
type ClientSafeError struct {
Message string
}
func (ClientSafeError) ClientSafeMessage ¶
func (err ClientSafeError) ClientSafeMessage() string
func (ClientSafeError) Error ¶
func (err ClientSafeError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.