Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
func NewAttachmentFromFile ¶
func NewAttachmentFromFile(file *os.File) (*Attachment, error)
func NewAttachmentFromFileHeader ¶
func NewAttachmentFromFileHeader(fileHeader *multipart.FileHeader) *Attachment
type Base ¶
type Base struct {
Id uuid.UUID `bun:"id,pk,type:uuid,default:uuidv7()"`
CreatedAt time.Time `bun:"created_at,nullzero,notnull,default:now()"`
UpdatedAt time.Time `bun:"updated_at,nullzero,notnull,default:now()"`
}
func (*Base) BeforeUpdate ¶
type UserSession ¶
type UserSession struct {
Base
UserId uuid.UUID
User *User `bun:"rel:belongs-to,join:user_id=id"`
Token string
IpAddress string
UserAgent string
}
func (*UserSession) GenerateToken ¶
func (as *UserSession) GenerateToken()
Click to show internal directories.
Click to hide internal directories.