models

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pets

type Pets struct {
	ID        string `json:"id" validate:"required" example:"pet-123456"`
	Name      string `json:"name" validate:"required" example:"Napoleon"`
	Age       int    `json:"age" example:"2" description:"Age of the pet, in years"`
	IsAdopted bool   `json:"is_adopted" description:"Is the pet adopted"`
}

func (*Pets) InTransform

func (*Pets) InTransform(context.Context) error

type PetsCreate

type PetsCreate struct {
	Name      string `json:"name" validate:"required,min=1,max=100" example:"Napoleon"`
	Age       int    `json:"age" validate:"min=0,max=100" example:"2" description:"Age of the pet, in years"`
	IsAdopted bool   `json:"is_adopted" description:"Is the pet adopted"`
}

type PetsUpdate

type PetsUpdate struct {
	Name      string `json:"name,omitempty" validate:"min=1,max=100" example:"Napoleon" description:"Name of the pet"`
	Age       int    `json:"age,omitempty" validate:"max=100" example:"2"`
	IsAdopted *bool  `json:"is_adopted,omitempty" description:"Is the pet adopted"`
}

Jump to

Keyboard shortcuts

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