dto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 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 ApiResponse

type ApiResponse struct {
	Code    int32  `json:"code"`
	Type    string `json:"type"`
	Message string `json:"message"`
}

ApiResponse represents a generic API response.

type Category

type Category struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

Category defines a pet category.

type CreatePetRequest

type CreatePetRequest struct {
	Name      string    `json:"name"`
	Category  *Category `json:"category,omitempty"`
	PhotoURLs []string  `json:"photoUrls"`
	Tags      []Tag     `json:"tags,omitempty"`
	Status    string    `json:"status,omitempty"`
}

Example request payload for creating a pet.

type DeletePetRequest

type DeletePetRequest struct {
	ApiKey string `header:"api_key"`
	ID     int64  `params:"petId" path:"petId"`
}

type GetPetByIdRequest

type GetPetByIdRequest struct {
	ID int64 `params:"petId" path:"petId"`
}

type Pet

type Pet struct {
	ID        int64     `json:"id"`
	Category  *Category `json:"category,omitempty"`
	Name      string    `json:"name"`
	PhotoURLs []string  `json:"photoUrls"`
	Tags      []Tag     `json:"tags,omitempty"`
	Status    string    `json:"status,omitempty"` // available, pending, sold
}

Pet defines a pet.

type Tag

type Tag struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

Tag defines a pet tag.

type UpdatePetRequest

type UpdatePetRequest struct {
	ID        int64     `json:"id"`
	Category  *Category `json:"category,omitempty"`
	Name      string    `json:"name"`
	PhotoURLs []string  `json:"photoUrls"`
	Tags      []Tag     `json:"tags,omitempty"`
	Status    string    `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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