Discover Packages
github.com/yosa12978/hjkl
types
package
Version:
v0.0.0-...-f17982d
Opens a new window with list of versions in this module.
Published: Aug 26, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Index Constants Variables Functions Types type Account type AccountCreateDto type AccountUpdateDto type Category type Message type Page type PageMetadata type Post type PostCreateDto type PostUpdateDto type ValidationError (a) Validate(ctx) (a) Validate(ctx) (p) Validate(ctx) (p) Validate(ctx)
Documentation
¶
type Account struct {
Id string `json:"id"`
Username string `json:"username"`
Password string `json:"-"`
Created string `json:"created"`
Salt string `json:"-"`
IsAdmin bool `json:"is_admin"`
}
type AccountCreateDto struct {
Username string `json:"username"`
Password string `json:"password"`
}
type AccountUpdateDto struct {
NewPassword string `json:"new_password"`
OldPassword string `json:"old_password"`
}
type Message struct {
StatusCode int `json:"status_code"`
Message string `json:"message"`
}
type Page[T any ] struct {
Content []T `json:"content"`
Meta PageMetadata `json:"meta"`
}
type PageMetadata struct {
HasNext bool `json:"has_next"`
HasPrevious bool `json:"has_previous"`
Total int `json:"total"`
Size int `json:"size"`
}
type Post struct {
Id string `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Created string `json:"created"`
Author string `json:"author"`
AuthorId string `json:"author_id"`
}
type PostCreateDto struct {
Title string `json:"title"`
Content string `json:"content"`
}
type PostUpdateDto struct {
Title string `json:"title"`
Content string `json:"content"`
}
type ValidationError struct {
StatusCode int `json:"status_code"`
Errors map[string ]string `json:"errors"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.