Documentation
¶
Index ¶
- func CombineList[T any](t ...[]T) []T
- func GetUUIDv7() uuid.UUID
- func GetUUIDv7R() mo.Result[uuid.UUID]
- func IsEmpty(s string) bool
- func IsNotEmpty(s string) bool
- func ToByteArray(id uuid.UUID) []byte
- func ToByteArrayPtr(id *uuid.UUID) *[]byte
- func ToDateTime(milliSec int64) time.Time
- func ToDateTimePtr(milliSec *int64) *time.Time
- func ToPtr[T any](data T) *T
- func ToString[T any](v T) string
- func ToUUID(barray []byte) uuid.UUID
- func ToUUIDPtr(barray *[]byte) *uuid.UUID
- func Uint64ToInt(u uint64) int
- type AlternateIdGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineList ¶
func CombineList[T any](t ...[]T) []T
func IsNotEmpty ¶ added in v0.1.9
IsNotEmpty returns true if s has at least one non-whitespace character.
func ToByteArray ¶
func ToByteArrayPtr ¶
func ToDateTime ¶
func ToDateTimePtr ¶
func Uint64ToInt ¶ added in v0.1.9
Uint64ToInt converts a uint64 to int, clamping to math.MaxInt to avoid overflow (e.g. for query params).
Types ¶
type AlternateIdGenerator ¶ added in v0.1.9
type AlternateIdGenerator struct {
// contains filtered or unexported fields
}
func NewAlternateIdGenerator ¶ added in v0.1.9
func NewAlternateIdGenerator(length ...int) *AlternateIdGenerator
func (*AlternateIdGenerator) GenerateAlternateId ¶ added in v0.1.9
func (w *AlternateIdGenerator) GenerateAlternateId() mo.Result[string]
func (*AlternateIdGenerator) ValidateAlternateId ¶ added in v0.1.9
func (w *AlternateIdGenerator) ValidateAlternateId(s string) mo.Result[bool]
Click to show internal directories.
Click to hide internal directories.