Documentation ¶
Index ¶
- Variables
- func CalcExpiry(days int) string
- func CheckToken(secret, expiry, input, token string) error
- func CombineDateTimePair(d, t time.Time) time.Time
- func Contains(str []string, target string) bool
- func DaysBetween(start, end time.Time) []time.Time
- func DefaultedDatesFromForm(form Gettable, numDaysFromNowDefault int, weekBoundary bool) (startTime, endTime time.Time, err error)
- 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 NextFlow(defaultURL string, form url.Values) string
- func Overlap(one, two Interval) bool
- func Parallelize(functions ...func() error) (errors []error)
- func ParseDateTimePair(d, t string, loc *time.Location) (time.Time, error)
- func Pluralise(num int, singular string, plural string) string
- func Prefix(strs []string, prefix string) []string
- func PrettyJsonString(input string) string
- func PrevDay(begin time.Time, target time.Weekday) time.Time
- func RollbackTx(ctx context.Context) error
- func RootPath(in *url.URL) string
- func SelectorSafe(in string) string
- func StripBlankStrings(input []string) []string
- func Truncate(num int, input string) string
- func Uniq(input []string) []string
- type ClientSafeError
- type Gettable
- type IntMap
- type Interval
- type NullStringList
- type Period
- type StringMap
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var Diff = diff.Diff
View Source
var ErrorTokenExpired = ClientSafeError{Message: "Token expired"}
View Source
var ErrorTokenInvalid = ClientSafeError{Message: "Token invalid"}
Functions ¶
func CalcExpiry ¶
func CheckToken ¶
func DefaultedDatesFromForm ¶ added in v0.0.17
func FirstFiveChars ¶
func FirstNonEmptyString ¶
func HashPassword ¶
func Parallelize ¶
func ParseDateTimePair ¶ added in v0.0.9
func PrettyJsonString ¶
func RollbackTx ¶
func SelectorSafe ¶ added in v0.0.32
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
type NullStringList ¶ added in v0.0.16
type NullStringList struct { Valid bool Strings pq.StringArray }
func (*NullStringList) Scan ¶ added in v0.0.16
func (n *NullStringList) Scan(value interface{}) error
Source Files ¶
- between.go
- client_safe_error.go
- contains.go
- diff.go
- first_five.go
- first_non_empty.go
- hash.go
- hash_password.go
- intmap.go
- next.go
- nullstringlist.go
- parallellize.go
- path.go
- period.go
- pluralise.go
- prefix.go
- selectorsafe.go
- stringmap.go
- strip_blank.go
- time.go
- tokens.go
- truncate.go
- tx.go
- uniq.go
- week_boundaries.go
- weekdays.go
Click to show internal directories.
Click to hide internal directories.