dto

package
v0.0.0-...-1cbff02 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDuelistDTO

type CreateDuelistDTO struct {
	Name         string    `json:"name" example:"JP"`
	Presentation string    `json:"presentation" example:"Jogar com Lair of Darkness"`
	BirthDate    time.Time `json:"birthDate" example:"14/09/1992"`
	Cep          string    `json:"cep" example:"72007040"`
	Email        string    `json:"email" example:"jp@gmail.com"`
	Phone        string    `json:"phone" example:"61999876543"`

	Address *cep.AddressDTO `json:"-"` // not serialized
}

CreateDuelistDTO represents the data transfer object for creating a new duelist

func (*CreateDuelistDTO) UnmarshalJSON

func (c *CreateDuelistDTO) UnmarshalJSON(data []byte) error

UnmarshalJSON customizes the unmarshalling behavior for CreateDuelistDTO

func (CreateDuelistDTO) Validate

func (c CreateDuelistDTO) Validate() error

Validate performs validation on the CreateDuelistDTO fields

type UpdateDuelistDTO

type UpdateDuelistDTO struct {
	Name         string    `json:"name"`
	Presentation string    `json:"presentation"`
	BirthDate    time.Time `json:"birthDate"`
	Cep          string    `json:"cep"`
	Email        string    `json:"email"`
	Phone        string    `json:"phone"`

	Address *cep.AddressDTO `json:"-"`
}

UpdateDuelistDTO represents the data transfer object for update a duelist

func (*UpdateDuelistDTO) UnmarshalJSON

func (c *UpdateDuelistDTO) UnmarshalJSON(data []byte) error

UnmarshalJSON customizes the unmarshalling behavior for UpdateDuelistDTO

func (UpdateDuelistDTO) Validate

func (c UpdateDuelistDTO) Validate() error

Validate performs validation on the UpdateDuelistDTO fields

Jump to

Keyboard shortcuts

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