modulepackage
0.0.0-20221219132603-9818dada473d
Repository: https://github.com/phogolabs/schema.git
Documentation: pkg.go.dev
# README
schema
A schema package contains a database types used by Golang
# Functions
IDFromBytes convert the byte array representation of `ID` back to `ID`.
IDFromString reads an ID from its string representation.
NewID creates a ID.
NewNullDate creates a new Time.
NewNullUUID creates a new nullable uuid.
NewURN creates a new urn.
NewUUID creates a UUID.
NullDateFrom creates a new Time that will always be valid.
NullDateFromPtr creates a new Time that will be null if t is nil.
NullUUIDFrom creates a new nullable UUID that will always be valid.
NullUUIDFromPtr creates a new nullable uuid that be null if i is nil.
Set sets the fields for given struct.
SetDefaults sets the defaults for given struct.
URNFromBytes parses a URN from bytes.
URNFromString parses a URN from string.
# Variables
DateTimeFormat represents the default format of the time.
NewNullBool creates a new Bool.
NewNullByte creates a new Byte.
NewNullBytes creates a new Bytes.
NewNullFloat32 creates a new Float32.
NewNullFloat64 creates a new Float64.
NewNullInt creates a new Int.
NewNullInt16 creates a new Int.
NewNullInt32 creates a new Int.
NewNullInt64 creates a new Int.
NewNullInt8 creates a new Int.
NewNullJSON creates a new Int.
NewNullString creates a new Int.
NewNullTime creates a new Int.
NewNullUint creates a new Int.
NewNullUint16 creates a new Int.
NewNullUint32 creates a new Int.
NewNullUint64 creates a new Int.
NewNullUint8 creates a new Int.
NewUUIDV1 returns a UUID based on the current timestamp and MAC address.
NewUUIDV3 returns a UUID based on the MD5 hash of the namespace UUID and name.
NewUUIDV4 returns a randomly generated UUID.
NewUUIDV5 returns a UUID based on SHA-1 hash of the namespace UUID and name.
NullBoolFrom creates a new Bool that will always be valid.
NullBoolFromPtr creates a new Bool that will be null if f is nil.
NullByteFrom creates a new Byte that will always be valid.
NullByteFromPtr creates a new Byte that be null if i is nil.
NullBytesFrom creates a new Bytes that will be invalid if nil.
NullBytesFromPtr creates a new Bytes that will be invalid if nil.
NullFloat32From creates a new Float32 that will always be valid.
NullFloat32FromPtr creates a new Float32 that be null if f is nil.
NullFloat64From creates a new Float64 that will always be valid.
NullFloat64FromPtr creates a new Float64 that be null if f is nil.
NullInt16From creates a new Int that will always be valid.
NullInt16FromPtr creates a new Int that be null if f is nil.
NullInt32From creates a new Int that will always be valid.
NullInt32FromPtr creates a new Int that be null if f is nil.
NullInt64From creates a new Int that will always be valid.
NullInt64FromPtr creates a new Int that be null if f is nil.
NullInt8From creates a new Int that will always be valid.
NullInt8FromPtr creates a new Int that be null if f is nil.
NullIntFrom creates a new Int that will always be valid.
NullIntFromPtr creates a new Int that be null if f is nil.
NullJSONFrom creates a new Int that will always be valid.
NullJSONFromPtr creates a new Int that be null if f is nil.
NullStringFrom creates a new Int that will always be valid.
NullStringFromPtr creates a new Int that be null if f is nil.
NullTimeFrom creates a new Int that will always be valid.
NullTimeFromPtr creates a new Int that be null if f is nil.
NullUint16From creates a new Int that will always be valid.
NullUint16FromPtr creates a new Int that be null if f is nil.
NullUint32From creates a new Int that will always be valid.
NullUint32FromPtr creates a new Int that be null if f is nil.
NullUint64From creates a new Int that will always be valid.
NullUint64FromPtr creates a new Int that be null if f is nil.
NullUint8From creates a new Int that will always be valid.
NullUint8FromPtr creates a new Int that be null if f is nil.
NullUintFrom creates a new Int that will always be valid.
NullUintFromPtr creates a new Int that be null if f is nil.
TimeNegativeInfinity represents the negative infinity time.
TimePositiveInfinity represents the positive infinity time.
UUIDFromBytes returns a UUID generated from the raw byte slice input.
UUIDFromBytesOrNil returns a UUID generated from the raw byte slice input.
UUIDFromString returns a UUID parsed from the input string.
UUIDFromStringOrNil returns a UUID parsed from the input string.
UUIDNil is the nil UUID, as specified in RFC-4122, that has all 128 bits set to zero.
# Type aliases
ID represents a unique request id.
NullBool is a nullable bool.
NullByte is an nullable int.
NullBytes is a nullable []byte.
NullFloat32 is a nullable float32.
NullFloat64 is a nullable float64.
NullInt is a nullable Int.
NullInt16 is a nullable Int16.
NullInt32 is a nullable Int32.
NullInt64 is a nullable Int64.
NullInt8 is a nullable Int8.
NullJSON is a nullable JSON.
NullString is a nullable String.
NullTime is a nullable Time.
NullUint is a nullable Uint.
NullUint16 is a nullable Uint16.
NullUint32 is a nullable Uint32.
NullUint64 is a nullable Uint64.
NullUint8 is a nullable Uint8.
No description provided by the author
No description provided by the author