dto

package
v0.0.0-...-9305a47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePostDTO

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

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

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

type GetUserDTO struct {
	ID int64 `json:"id" validate:"gt=0"`
}

type ListPostDTO

type ListPostDTO struct {
	Limit int32  `json:"limit" validate:"omitempty,gt=0"`
	Page  int32  `json:"page" validate:"omitempty,gt=0"`
	Query string `json:"query"`
}

type ListPostFilter

type ListPostFilter struct {
	Limit                int32
	Page                 int32
	Query                string
	RelatedToUser        int64
	DisplayOnlyPublished bool
}

type LoginDTO

type LoginDTO struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type PublicGetDTO

type PublicGetDTO struct {
	ID int64 `json:"id" validate:"gt=0"`
}

type RegisterDTO

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

type UpdatePasswordDTO struct {
	OldPassword string `json:"oldPassword" validate:"required"`
	NewPassword string `json:"newPassword" validate:"required,nefield=OldPassword"`
}

type UpdateProfileDTO

type UpdateProfileDTO struct {
	DisplayedName string  `json:"displayedName" validate:"required"`
	Email         *string `json:"email" validate:"omitempty,email"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL