Documentation ¶
Index ¶
- Constants
- func BoolToInt(b bool) int8
- func CSVToMap(reader *bytes.Buffer) ([]map[string]string, error)
- func ChunkSliceUint64(slice []uint64, chunkSize int) [][]uint64
- func ConvertUint64ToHex(serialNumber uint64) string
- func Copy(src, dst string, bufferSize int64) error
- func DBTransaction(ormService *orm.Engine, callback transaction) error
- func ExistsInDir(filename, dir string) bool
- func FileExistsInDir(filename, dir string) bool
- func GenerateUUID() string
- func GetFileExtensionFromBase64Header(base64Header string) (string, error)
- func GetSecondsDifference(from, to time.Time) float64
- func GetTemplateDirectory() string
- func GetTimeDifferenceHuman(startDate, endDate time.Time) string
- func GetTimeDifferenceHumanBySeconds(seconds float64) string
- func GetTimestamp(t *time.Time) int64
- func GetWeekDay(dateTime time.Time) uint8
- func IsValidEnum(val string, enums map[string]string) bool
- func Limit(pager *orm.Pager) string
- func SliceUint64Difference(slice1 []uint64, slice2 []uint64) []uint64
- func ValidateAndParseTimeRange(startsAt, endsAt, fromName, toName string, startsAtGTENow bool, c *gin.Context) (*time.Time, *time.Time, error)
- type Price
- type TimeDifference
Constants ¶
View Source
const ( TimeLayoutY = "2006" TimeLayoutYM = "2006-01" TimeLayoutYMD = "2006-01-02" TimeLayoutYMDHM = "2006-01-02 15:04" TimeLayoutYMDHMS = "2006-01-02 15:04:05" TimeLayoutHM = "15:04" TimeLayoutMDYYYYHMMSSPM = "1/2/2006 3:04:05 PM" TimeLayoutNoSepYYYYMMDDHHMM = "200601021504" TimeLayoutTextMD = "January 2" )
View Source
const Day = 86400
View Source
const Hour = 3600
View Source
const Minute = 60
View Source
const Month = 2592000
View Source
const Second = 1
View Source
const Week = 604800
View Source
const Year = 31104000
Variables ¶
This section is empty.
Functions ¶
func ChunkSliceUint64 ¶ added in v0.0.8
func ConvertUint64ToHex ¶ added in v0.0.8
func DBTransaction ¶ added in v0.0.8
func ExistsInDir ¶
func FileExistsInDir ¶ added in v0.0.8
func GenerateUUID ¶ added in v0.0.8
func GenerateUUID() string
func GetFileExtensionFromBase64Header ¶ added in v0.0.8
func GetSecondsDifference ¶ added in v0.0.8
func GetTemplateDirectory ¶ added in v0.0.8
func GetTemplateDirectory() string
func GetTimeDifferenceHuman ¶ added in v0.0.8
func GetTimeDifferenceHumanBySeconds ¶ added in v0.0.8
func GetTimestamp ¶ added in v0.0.8
func GetWeekDay ¶ added in v0.0.8
func SliceUint64Difference ¶ added in v0.0.8
Types ¶
type Price ¶ added in v0.0.8
type Price int64
func NewTotalPrice ¶ added in v0.0.8
func (Price) StringWithCurrency ¶ added in v0.0.8
type TimeDifference ¶ added in v0.0.8
type TimeDifference struct {
Years, Months, Days, Hours, Minutes, Seconds int
}
func GetTimeDifference ¶ added in v0.0.8
func GetTimeDifference(from, to time.Time) *TimeDifference
Click to show internal directories.
Click to hide internal directories.