Documentation ¶
Index ¶
- Constants
- func BasicAuth(username, password string) string
- func BoolToInt(b bool) int8
- func CSVToMap(reader *bytes.Buffer) ([]map[string]string, error)
- func Call(ctx context.Context, method, url string, headers map[string]string, ...) ([]byte, http.Header, int, error)
- func CallXML(ctx context.Context, method, url string, headers map[string]string, ...) ([]byte, http.Header, int, error)
- func ChunkSliceUint64(slice []uint64, chunkSize int) [][]uint64
- func ConvertUint64ToHex(serialNumber uint64) string
- func Copy(src, dst string, bufferSize int64) error
- func DBTransaction(ormService *beeorm.Engine, callback transaction) error
- func ExistsInDir(filename, dir string) bool
- func FileExistsInDir(filename, dir string) bool
- func GetFileExtensionFromBase64Header(base64Header string) (string, error)
- func GetFirstDayOfNextMonth() time.Time
- func GetLastDayOfThisMonth() time.Time
- func GetPhoneWithPlus(mobile string) string
- 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 HasIntersectionInt(a []int, b []int) bool
- func HasIntersectionInt32(a []int32, b []int32) bool
- func HasIntersectionInt64(a []int64, b []int64) bool
- func HasIntersectionUInt32(a []uint32, b []uint32) bool
- func HasIntersectionUInt64(a []uint64, b []uint64) bool
- func Int32InArray(s int32, arr ...int32) bool
- func Int64InArray(s int64, arr ...int64) bool
- func IntInArray(s int, arr ...int) bool
- func IsValidEnum(val string, enums map[string]string) bool
- func Limit(pager *beeorm.Pager) string
- func SliceUint64Difference(slice1 []uint64, slice2 []uint64) []uint64
- func StringInArray(s string, arr ...string) bool
- func SubtractInt32Slice(a []int32, b []int32) []int32
- func SubtractInt64Slice(a []int64, b []int64) []int64
- func SubtractIntSlice(a []int, b []int) []int
- func SubtractUInt32Slice(a []uint32, b []uint32) []uint32
- func SubtractUInt64Slice(a []uint64, b []uint64) []uint64
- func SubtractUIntSlice(a []uint, b []uint) []uint
- func TruncateTime(in time.Time) time.Time
- func UIn32tInArray(s uint32, arr ...uint32) bool
- func UIn64tInArray(s uint64, arr ...uint64) bool
- func UniqueInt(a []int) []int
- func UniqueInt32(a []int32) []int32
- func UniqueInt64(a []int64) []int64
- func UniqueString(a []string) []string
- func UniqueUInt32(a []uint32) []uint32
- func UniqueUInt64(a []uint64) []uint64
- func ValidateAndParseTimeRange(startsAt, endsAt, fromName string, startsAtGTENow bool) (*time.Time, *time.Time, error)
- type DTOPrice
- type Price
- type TimeDifference
- type URLQueryPager
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" TimeLayoutRFC3339Milli = "2006-01-02T15:04:05.999Z07:00" TimeLayoutRFC3339 = "2006-01-02T15:04:05.999Z" )
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 Call ¶ added in v0.3.3
func Call(ctx context.Context, method, url string, headers map[string]string, timeout time.Duration, payload interface{}, cookies []*http.Cookie) ([]byte, http.Header, int, error)
Call helper for api calls TODO : make service and use debug service to
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 GetFileExtensionFromBase64Header ¶ added in v0.0.8
func GetFirstDayOfNextMonth ¶ added in v1.0.41
func GetLastDayOfThisMonth ¶ added in v1.0.41
func GetPhoneWithPlus ¶ added in v1.2.32
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 HasIntersectionInt ¶ added in v0.1.3
func HasIntersectionInt32 ¶ added in v0.1.3
func HasIntersectionInt64 ¶ added in v0.1.3
func HasIntersectionUInt32 ¶ added in v0.1.3
func HasIntersectionUInt64 ¶ added in v0.1.3
func Int32InArray ¶ added in v0.1.3
func Int64InArray ¶ added in v0.1.3
func IntInArray ¶ added in v0.1.3
func SliceUint64Difference ¶ added in v0.0.8
func StringInArray ¶ added in v0.1.3
func SubtractInt32Slice ¶ added in v0.1.7
func SubtractInt64Slice ¶ added in v0.1.7
func SubtractIntSlice ¶ added in v0.1.7
func SubtractUInt32Slice ¶ added in v0.1.7
func SubtractUInt64Slice ¶ added in v0.1.7
func SubtractUIntSlice ¶ added in v0.1.7
func UIn32tInArray ¶ added in v0.1.3
func UIn64tInArray ¶ added in v0.1.3
func UniqueInt32 ¶ added in v0.1.3
func UniqueInt64 ¶ added in v0.1.3
func UniqueString ¶ added in v0.1.3
func UniqueUInt32 ¶ added in v0.1.3
func UniqueUInt64 ¶ added in v0.1.3
Types ¶
type DTOPrice ¶ added in v1.2.16
func GetPriceDTO ¶ added in v1.2.16
type Price ¶ added in v0.0.8
type Price int64
func NewTotalPrice ¶ added in v0.0.8
func (Price) StringByLocale ¶ added in v1.0.59
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
type URLQueryPager ¶ added in v0.2.1
Source Files ¶
Click to show internal directories.
Click to hide internal directories.