package
Version:
v0.0.0-...-9305a47
Opens a new window with list of versions in this module.
Published: May 30, 2024
License: GPL-3.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CreatePostDTO struct {
Title string `json:"title" validate:"required"`
Short string `json:"short" validate:"required"`
Body string `json:"body" validate:"required"`
Tags []string `json:"tags" validate:"omitempty,dive,alphanum"`
IsPublished bool `json:"isPublished"`
}
type EditPostDTO struct {
ID int64 `json:"-" validate:"gt=0"`
Title string `json:"title" validate:"required"`
Short string `json:"short" validate:"required"`
Body string `json:"body" validate:"required"`
Tags []string `json:"tags"`
IsPublished bool `json:"isPublished"`
}
type FeedPostDTO struct {
Limit int32 `json:"limit" validate:"omitempty,gt=0"`
Page int32 `json:"page" validate:"omitempty,gt=0"`
Query string `json:"query"`
}
type GetUserDTO struct {
ID int64 `json:"id" validate:"gt=0"`
}
type ListPostDTO struct {
Limit int32 `json:"limit" validate:"omitempty,gt=0"`
Page int32 `json:"page" validate:"omitempty,gt=0"`
Query string `json:"query"`
}
type LoginDTO struct {
Username string `json:"username" validate:"required"`
Password string `json:"password" validate:"required"`
}
type PublicGetDTO struct {
ID int64 `json:"id" validate:"gt=0"`
}
type RegisterDTO struct {
Username string `json:"username" validate:"required"`
Password string `json:"password" validate:"required"`
DisplayedName string `json:"displayedName" validate:"required"`
Invite string `json:"invite" validate:"required,uuid"`
}
type UpdatePasswordDTO struct {
OldPassword string `json:"oldPassword" validate:"required"`
NewPassword string `json:"newPassword" validate:"required,nefield=OldPassword"`
}
type UpdateProfileDTO struct {
DisplayedName string `json:"displayedName" validate:"required"`
Email *string `json:"email" validate:"omitempty,email"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.