Documentation
¶
Index ¶
Constants ¶
View Source
const MaxAgentRules = 10
View Source
const MinAgentNameLength = 3
View Source
const MinPasswordLength = 8
Variables ¶
This section is empty.
Functions ¶
func VerifyUser ¶
Types ¶
type Agent ¶
type Agent struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `gorm:"index" json:"created_at"`
UpdatedAt time.Time `gorm:"index" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
Name string `json:"name"`
UserID uint `gorm:"index" json:"-"`
Rules datatypes.JSON `sql:"type:jsonb" json:"rules"`
Token string `gorm:"index" json:"token"`
Address string `json:"address"`
UserAgent string `json:"user_agent"`
}
func FindAgentByToken ¶
func RegisterAgent ¶
type User ¶
type User struct {
ID uint `gorm:"primarykey" json:"-""`
CreatedAt time.Time `gorm:"index" json:"created_at"`
UpdatedAt time.Time `gorm:"index" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
Email string `gorm:"index" json:"email"`
Verification string `gorm:"index" json:"-"`
Verified bool `gorm:"index" json:"-"`
Use2FA bool `gorm:"default:true" json:"use_2fa"` // i know it's not 2fa yet
Hash string `json:"-"`
Address string `json:"address"`
Agents []Agent `json:"-"`
}
func FindUserByID ¶
func RegisterUser ¶
Click to show internal directories.
Click to hide internal directories.