package
Version:
v0.0.0-...-470840f
Opens a new window with list of versions in this module.
Published: Jun 21, 2022
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Follow struct {
Follower uint `json:"follower" gorm:"primaryKey;foreignKey:ID;"`
Following uint `json:"following" gorm:"primaryKey;foreignKey:ID;"`
}
type FollowForm struct {
Follow string `json:"follow" form:"follow"`
Unfollow string `json:"unfollow" form:"follow"`
Latest pq.StringArray `json:"latest" form:"latest"`
}
type LoginForm struct {
Username string `form:"username" binding:"required"`
Password string `form:"password" binding:"required"`
}
type Message struct {
MessageID uint `json:"messageID" gorm:"primaryKey"`
Author string `json:"authorID" gorm:"foreignKey:Username;"`
Text string `json:"text"`
CreatedAt time.Time `json:"createdAt"`
Flagged bool `json:"flagged"`
}
type MessageForm struct {
Content string `json:"content" form:"content" binding:"required"`
}
type RegisterForm struct {
Username string `json:"username" form:"username" binding:"required"`
Email string `json:"email" form:"email" binding:"required"`
Password string `json:"pwd" form:"password" binding:"required"`
}
type User struct {
ID uint `json:"id" gorm:"primary_key"`
Username string `json:"username" gorm:"unique;type:varchar(100);not null"`
Email string `json:"email" gorm:"type:varchar(100);not null"`
Salt string `json:"salt" gorm:"type:varchar(100);not null"`
Password string `json:"password" gorm:"not null"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.