dto

package
v0.0.0-...-43a9cef Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTodoItemRequest

type CreateTodoItemRequest struct {
	Description string    `json:"description" validate:"required,lte=100,gte=3"`
	DueDate     time.Time `json:"dueDate" validate:"required"`
	FileName    string    `json:"fileName" validate:"required"`
}

func (CreateTodoItemRequest) Validate

func (ctr CreateTodoItemRequest) Validate(ctx context.Context) error

type CreateTodoItemResponse

type CreateTodoItemResponse struct {
	ID string `json:"id"`
}

type DeleteTodoItemRequest

type DeleteTodoItemRequest struct {
	ID string `json:"id" validate:"required,uuid"`
}

func (DeleteTodoItemRequest) Validate

func (dtr DeleteTodoItemRequest) Validate(ctx context.Context) error

type DownloadFileRequest

type DownloadFileRequest struct {
	FileName string `json:"fileName" validate:"required"`
}

func (DownloadFileRequest) Validate

func (dfr DownloadFileRequest) Validate(ctx context.Context) error

type DownloadFileResponse

type DownloadFileResponse struct {
	File []byte `json:"file"`
}

type GetTodoItemByIDRequest

type GetTodoItemByIDRequest struct {
	ID string `json:"id" validate:"required,uuid"`
}

func (GetTodoItemByIDRequest) Validate

func (gtr GetTodoItemByIDRequest) Validate(ctx context.Context) error

type GetTodoItemByIDResponse

type GetTodoItemByIDResponse struct {
	ID          string    `json:"id"`
	Description string    `json:"description"`
	DueDate     time.Time `json:"dueDate"`
	FileName    string    `json:"fileName"`
}

type UpdateTodoItemRequest

type UpdateTodoItemRequest struct {
	ID          string    `json:"id" validate:"required,uuid"`
	Description string    `json:"description" validate:"required,lte=100,gte=3"`
	DueDate     time.Time `json:"dueDate" validate:"required"`
	FileName    string    `json:"fileName" validate:"required"`
}

func (UpdateTodoItemRequest) Validate

func (utr UpdateTodoItemRequest) Validate(ctx context.Context) error

type UploadFileRequest

type UploadFileRequest struct {
	FileHeader *multipart.FileHeader `json:"fileHeader"`
}

func (UploadFileRequest) Validate

func (ufr UploadFileRequest) Validate(ctx context.Context) error

type UploadFileResponse

type UploadFileResponse struct {
	FileName string `json:"fileName"`
}

Jump to

Keyboard shortcuts

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