dto

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameRequest

type GameRequest struct {
	Name        string            `json:"name" example:"X-Men Legends"`
	ReleaseYear int               `json:"releaseYear" example:"2004"`
	TeamID      *string           `json:"teamId" example:"c184abee-d573-442d-b1b7-ba93aff61fb6"`
	HeroID      []string          `json:"heroId" example:"c184abee-d573-442d-b1b7-ba93aff61fb6"`
	Universe    universe.Universe `json:"universe" example:"MARVEL"`
	Consoles    []console.Console `json:"consoles"`
}

func (*GameRequest) Validator

func (g *GameRequest) Validator() error

type GameResponse

type GameResponse struct {
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	ReleaseYear int               `json:"releaseYear"`
	Universe    universe.Universe `json:"universe"`
	TeamID      *string           `json:"teamId,omitempty"`
	HeroID      []string          `json:"heroId,omitempty"`
	CreatedAt   time.Time         `json:"createdAt,omitempty"`
	UpdatedAt   *time.Time        `json:"updatedAt,omitempty"`
	Consoles    []console.Console `json:"consoles"`
}

func NewGameResponse

func NewGameResponse(id, name string, releaseYear int, teamID *string, universe universe.Universe,
	createdAt time.Time, updatedAt *time.Time, heroID []string, consoles []console.Console) *GameResponse

Jump to

Keyboard shortcuts

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