models

package
v0.0.0-...-03dfacc Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobResponse

type BlobResponse struct {
	ID     string `json:"id"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

type BlobSimilarResponse

type BlobSimilarResponse struct {
	ID      string                   `json:"id"`
	Width   int                      `json:"width"`
	Height  int                      `json:"height"`
	Similar []PostSimilarityListItem `json:"similar"`
}

type ErrorResponse

type ErrorResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type LoginFormModel

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

type PostCreateModel

type PostCreateModel struct {
	BlobID    string   `json:"blob_id" validate:"required"`
	SourceURL string   `json:"source_url"`
	Tags      []string `json:"tags"`
}

type PostListItem

type PostListItem struct {
	ID                 string `json:"id"`
	ImagePath          string `json:"image_path"`
	ImageThumbnailPath string `json:"thumbnail_path"`
}

type PostPaginationResponse

type PostPaginationResponse struct {
	CurrentPage int            `json:"currentPage"`
	TotalPage   int            `json:"totalPage"`
	PostCount   int            `json:"postCount"`
	Posts       []PostListItem `json:"posts"`
	Tags        []TagListItem  `json:"tags"`
}

type PostReadModel

type PostReadModel struct {
	ID               string        `json:"id"`
	ImagePreviewPath string        `json:"preview_path"`
	ImagePath        string        `json:"image_path"`
	SourceURL        string        `json:"source_url"`
	Tags             []TagListItem `json:"tags"`
	Width            int           `json:"width"`
	Height           int           `json:"height"`
	Uploader         string        `json:"uploader"`
}

type PostSimilarityListItem

type PostSimilarityListItem struct {
	ID       string `json:"id"`
	Distance int    `json:"distance"`
}

type PostUpdateModel

type PostUpdateModel struct {
	SourceURL string   `json:"source_url"`
	Tags      []string `json:"tags"`
}

type TagAutocompleteListItem

type TagAutocompleteListItem struct {
	Name string `json:"name"`
}

type TagCreateModel

type TagCreateModel struct {
	Name      string `json:"name" validate:"required,ascii"`
	TagTypeID uint   `json:"tagTypeId" validate:"required"`
}

type TagListItem

type TagListItem struct {
	TagID     string `json:"tagId"`
	TagName   string `json:"tagName"`
	TagType   string `json:"tagType"`
	PostCount int    `json:"postCount"`
}

type TagNoteUpdateModel

type TagNoteUpdateModel struct {
	Note string `json:"note" validate:"required"`
}

type TagReadModel

type TagReadModel struct {
	TagID     string `json:"tagId"`
	TagName   string `json:"tagName"`
	TagType   string `json:"tagType"`
	TagNote   string `json:"tagNote"`
	PostCount int    `json:"postCount"`
}

type TagTypeCreateModel

type TagTypeCreateModel struct {
	Name string `json:"name" validate:"required,ascii"`
}

type TagTypeListItem

type TagTypeListItem struct {
	ID   uint   `json:"id"`
	Name string `json:"name"`
}

type TagUpdateModel

type TagUpdateModel struct {
	Name      string `json:"name" validate:"required,ascii"`
	TagTypeID uint   `json:"tagTypeId" validate:"required"`
}

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

type UserCreateModel

type UserCreateModel struct {
	Email    string `json:"email" validate:"required,email"`
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type UserProfileResponse

type UserProfileResponse struct {
	Email    string `json:"email"`
	Username string `json:"username"`
}

type UserUpdateModel

type UserUpdateModel struct {
	Email       string `json:"email" validate:"required,email"`
	Username    string `json:"username" validate:"required"`
	OldPassword string `json:"oldPassword"`
	NewPassword string `json:"newPassword"`
}

Jump to

Keyboard shortcuts

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