package
Version:
v0.0.0-...-bceaf69
Opens a new window with list of versions in this module.
Published: Dec 1, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Article struct {
Author *User `json:"author,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt null.Time `json:"updatedAt"`
Title string `json:"title"`
Contents string `json:"contents"`
Slug string `json:"slug"`
AuthorID uint `json:"authorID"`
ID uint `json:"id"`
}
type CreateArticle struct {
Title string `json:"title"`
Contents string `json:"contents"`
AuthorID uint `json:"authorID"`
}
type InternalUser struct {
Avatar null.String `json:"avatar"`
Password string `json:"password"`
User
}
InternalUser contains private user info that should not be exposed to clients.
type User struct {
CreatedAt time.Time `json:"createdAt"`
UpdatedAt null.Time `json:"updatedAt"`
Username string `json:"username"`
Email string `json:"email"`
ID uint `json:"id"`
}
User the public user DTO. Used to show profiles for example.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.