utils

package module
v1.14.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 10 Imported by: 0

README ΒΆ

GitHub go.mod Go version GitHub tag (latest SemVer) Golang CI

🚜 utils

Rovergulf Engineers common utils repository

🦍 packages

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

View Source
var Months = map[time.Month]int{
	time.January:   1,
	time.February:  2,
	time.March:     3,
	time.April:     4,
	time.May:       5,
	time.June:      6,
	time.July:      7,
	time.August:    8,
	time.September: 9,
	time.October:   10,
	time.November:  11,
	time.December:  12,
}

Functions ΒΆ

func CheckInt ΒΆ

func CheckInt(old, new int) int

func CheckInt16 ΒΆ

func CheckInt16(old, new int16) int16

func CheckInt32 ΒΆ

func CheckInt32(old, new int32) int32

func CheckInt64 ΒΆ

func CheckInt64(old, new int64) int64

func CheckInt8 ΒΆ

func CheckInt8(old, new int8) int8

func CheckJson ΒΆ

func CheckJson(old, new json.RawMessage) (json.RawMessage, error)

func CheckString ΒΆ

func CheckString(old, new string) string

func CheckUint16 ΒΆ

func CheckUint16(old, new uint16) uint16

func CheckUint32 ΒΆ

func CheckUint32(old, new uint32) uint32

func CheckUint64 ΒΆ

func CheckUint64(old, new uint64) uint64

func CheckUint8 ΒΆ

func CheckUint8(old, new uint8) uint8

func FormatUnixTimestampToPgComparisonValue ΒΆ

func FormatUnixTimestampToPgComparisonValue(timestamp int) string

func GenerateHashFromString ΒΆ

func GenerateHashFromString(str string) string

func GenerateSaltedHash ΒΆ added in v1.14.1

func GenerateSaltedHash(str string, salt string) string

func GetRandomString ΒΆ

func GetRandomString(n int) string

returns random symbol string with specified length = n

func RemoveInt16DuplicatesUnordered ΒΆ

func RemoveInt16DuplicatesUnordered(elements []int16) []int16

func RemoveInt32DuplicatesUnordered ΒΆ

func RemoveInt32DuplicatesUnordered(elements []int32) []int32

func RemoveInt64DuplicatesUnordered ΒΆ

func RemoveInt64DuplicatesUnordered(elements []int64) []int64

func RemoveInt8DuplicatesUnordered ΒΆ

func RemoveInt8DuplicatesUnordered(elements []int8) []int8

func RemoveIntDuplicatesUnordered ΒΆ

func RemoveIntDuplicatesUnordered(elements []int) []int

func RemoveSpecifiedInt16FromSlice ΒΆ

func RemoveSpecifiedInt16FromSlice(elements []int16, toRemove ...int16) []int16

func RemoveSpecifiedInt32FromSlice ΒΆ

func RemoveSpecifiedInt32FromSlice(elements []int32, toRemove ...int32) []int32

func RemoveSpecifiedInt64FromSlice ΒΆ

func RemoveSpecifiedInt64FromSlice(elements []int64, toRemove ...int64) []int64

func RemoveSpecifiedInt8FromSlice ΒΆ

func RemoveSpecifiedInt8FromSlice(elements []int8, toRemove ...int8) []int8

func RemoveSpecifiedIntFromSlice ΒΆ

func RemoveSpecifiedIntFromSlice(elements []int, toRemove ...int) []int

func RemoveSpecifiedStringFromSlice ΒΆ

func RemoveSpecifiedStringFromSlice(elements []string, toRemove ...string) []string

func RemoveStrDuplicatesUnordered ΒΆ

func RemoveStrDuplicatesUnordered(elements []string) []string

func UnquoteString ΒΆ added in v0.5.1

func UnquoteString(s string) string

func UnsafeInterfaceByteSize ΒΆ

func UnsafeInterfaceByteSize(res interface{}) float32

func ValidateEmail ΒΆ

func ValidateEmail(email string) bool
func ValidateFullShortlink(r string) bool

func ValidatePhoneNumber ΒΆ

func ValidatePhoneNumber(phone string) bool

func ValidateResourceName ΒΆ added in v1.6.0

func ValidateResourceName(r string) bool
func ValidateShortlink(r string) bool

func VerifyBitwiseComparison ΒΆ

func VerifyBitwiseComparison(toCheck uint64, values ...uint64) bool

Types ΒΆ

type Float32Array ΒΆ

type Float32Array []float32

func (Float32Array) Len ΒΆ

func (s Float32Array) Len() int

func (Float32Array) Less ΒΆ

func (s Float32Array) Less(i, j int) bool

func (Float32Array) Swap ΒΆ

func (s Float32Array) Swap(i, j int)

type Float64Array ΒΆ

type Float64Array []float64

func (Float64Array) Len ΒΆ

func (s Float64Array) Len() int

func (Float64Array) Less ΒΆ

func (s Float64Array) Less(i, j int) bool

func (Float64Array) Swap ΒΆ

func (s Float64Array) Swap(i, j int)

type Int16Array ΒΆ

type Int16Array []int16

func (Int16Array) Len ΒΆ

func (s Int16Array) Len() int

func (Int16Array) Less ΒΆ

func (s Int16Array) Less(i, j int) bool

func (Int16Array) Swap ΒΆ

func (s Int16Array) Swap(i, j int)

type Int32Array ΒΆ

type Int32Array []int32

func (Int32Array) Len ΒΆ

func (s Int32Array) Len() int

func (Int32Array) Less ΒΆ

func (s Int32Array) Less(i, j int) bool

func (Int32Array) Swap ΒΆ

func (s Int32Array) Swap(i, j int)

type Int64Array ΒΆ

type Int64Array []int64

func (Int64Array) Len ΒΆ

func (s Int64Array) Len() int

func (Int64Array) Less ΒΆ

func (s Int64Array) Less(i, j int) bool

func (Int64Array) Swap ΒΆ

func (s Int64Array) Swap(i, j int)

type Int8Array ΒΆ

type Int8Array []int8

func (Int8Array) Len ΒΆ

func (s Int8Array) Len() int

func (Int8Array) Less ΒΆ

func (s Int8Array) Less(i, j int) bool

func (Int8Array) Swap ΒΆ

func (s Int8Array) Swap(i, j int)

type IntArray ΒΆ

type IntArray []int

func (IntArray) Len ΒΆ

func (s IntArray) Len() int

func (IntArray) Less ΒΆ

func (s IntArray) Less(i, j int) bool

func (IntArray) Swap ΒΆ

func (s IntArray) Swap(i, j int)

type PropertyMap ΒΆ

type PropertyMap map[string]interface{}

jsonb

func (*PropertyMap) Scan ΒΆ

func (p *PropertyMap) Scan(source json.RawMessage) error

type StringArray ΒΆ

type StringArray []string

func (StringArray) Len ΒΆ

func (s StringArray) Len() int

func (StringArray) Less ΒΆ

func (s StringArray) Less(i, j int) bool

func (StringArray) Swap ΒΆ

func (s StringArray) Swap(i, j int)

type Uint16Array ΒΆ

type Uint16Array []uint16

func (Uint16Array) Len ΒΆ

func (s Uint16Array) Len() int

func (Uint16Array) Less ΒΆ

func (s Uint16Array) Less(i, j int) bool

func (Uint16Array) Swap ΒΆ

func (s Uint16Array) Swap(i, j int)

type Uint32Array ΒΆ

type Uint32Array []uint32

func (Uint32Array) Len ΒΆ

func (s Uint32Array) Len() int

func (Uint32Array) Less ΒΆ

func (s Uint32Array) Less(i, j int) bool

func (Uint32Array) Swap ΒΆ

func (s Uint32Array) Swap(i, j int)

type Uint64Array ΒΆ

type Uint64Array []uint64

func (Uint64Array) Len ΒΆ

func (s Uint64Array) Len() int

func (Uint64Array) Less ΒΆ

func (s Uint64Array) Less(i, j int) bool

func (Uint64Array) Swap ΒΆ

func (s Uint64Array) Swap(i, j int)

type Uint8Array ΒΆ

type Uint8Array []uint8

func (Uint8Array) Len ΒΆ

func (s Uint8Array) Len() int

func (Uint8Array) Less ΒΆ

func (s Uint8Array) Less(i, j int) bool

func (Uint8Array) Swap ΒΆ

func (s Uint8Array) Swap(i, j int)

type UintArray ΒΆ

type UintArray []uint

func (UintArray) Len ΒΆ

func (s UintArray) Len() int

func (UintArray) Less ΒΆ

func (s UintArray) Less(i, j int) bool

func (UintArray) Swap ΒΆ

func (s UintArray) Swap(i, j int)

Directories ΒΆ

Path Synopsis
datastructures
pq
mq

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL