Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorInvalidFormat = errors.New("invalid UUID format")
Functions ¶
This section is empty.
Types ¶
type UUID ¶
type UUID [16]byte
var Nil UUID
func (UUID) MarshalJSON ¶
MarshalJSON encodes the UUID as a JSON string. Implements `json.Marshaler` interface.
func (UUID) String ¶
String returns the UUID in string format, e. g. `"018b1492-8002-7338-bae4-adb32c1b949a"`.
func (*UUID) UnmarshalJSON ¶
UnmarshalJSON decodes a UUID from a JSON string.
func (UUID) Value ¶
Value implements the `driver.Valuer` interface of `database/sql/driver`. Returns the UUID serialized to string format, e. g. `"018b1492-8002-7338-bae4-adb32c1b949a"`. This is the format expected by PostgreSQL. To get a byte slice, use the slicing operator. The error return value is always nil.
Click to show internal directories.
Click to hide internal directories.