Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
func (Permission) TableName ¶
func (Permission) TableName() string
type Role ¶
type Session ¶ added in v0.9.79
type Session struct {
ID uuid.UUID `gorm:"primaryKey"`
UserID int
CredentialVersion int64
RefreshTokenID uuid.UUID
ExpiresAt time.Time
RevokedAt sql.Null[time.Time]
CreatedAt time.Time
UpdatedAt time.Time
}
Session is one login and its rotating refresh-token family. JWT strings are never persisted; the signed session and token IDs identify its state.
type Token ¶
type Token struct {
ID int
UUID uuid.UUID
UserID int
Token string
Name string
LastUsedAt sql.Null[time.Time]
ExpiresAt sql.Null[time.Time]
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt
Permissions []Permission `gorm:"-"`
}
func (*Token) PermissionList ¶
type User ¶
type User struct {
ID int
UUID uuid.UUID
Email string
Password sql.Null[string]
CredentialVersion int64 `gorm:"default:1"`
Status string
IsSystem bool
Metadata json.RawMessage
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt
Roles []Role `gorm:"-"`
}
func (*User) PermissionList ¶
func (*User) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.