Documentation ¶
Index ¶
- Constants
- Variables
- type ID
- type Model
- type UIntID
- type UIntModel
- type UUID
- func (id UUID) ClockSequence() int
- func (id UUID) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (id UUID) GormValue(_ context.Context, db *gorm.DB) clause.Expr
- func (id UUID) IsNil() bool
- func (id UUID) MarshalBinary() ([]byte, error)
- func (id UUID) MarshalText() ([]byte, error)
- func (id *UUID) Scan(src interface{}) error
- func (id UUID) String() string
- func (id UUID) Time() uuid.Time
- func (id UUID) URN() string
- func (id *UUID) UnmarshalBinary(data []byte) error
- func (id *UUID) UnmarshalText(data []byte) error
- func (id UUID) Value() (driver.Value, error)
- func (id UUID) Variant() uuid.Variant
- func (id UUID) Version() uuid.Version
- type UUIDModel
Constants ¶
View Source
const NilUIntID = 0
Variables ¶
View Source
var NilUUID = UUID(uuid.Nil)
Functions ¶
This section is empty.
Types ¶
type UIntModel ¶
type UUID ¶
func (UUID) ClockSequence ¶
func (UUID) MarshalBinary ¶
func (UUID) MarshalText ¶
func (*UUID) UnmarshalBinary ¶
func (*UUID) UnmarshalText ¶
type UUIDModel ¶
type UUIDModel struct { ID UUID `gorm:"primarykey;not null"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` }
Base Model for gorm
Every model intended to be saved in the database must embed this UUIDModel or UIntModel reference: https://gorm.io/docs/models.html#gorm-Model
Click to show internal directories.
Click to hide internal directories.