model

package
v0.0.0-...-8b88020 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Superhero

type Superhero struct {
	ID                    string  `json:"id" validate:"required"`
	Email                 string  `json:"email" validate:"omitempty"`
	Name                  string  `json:"name" validate:"omitempty"`
	SuperheroName         string  `json:"superheroName" validate:"omitempty"`
	MainProfilePicURL     string  `json:"mainProfilePicUrl" validate:"omitempty"`
	Gender                int     `json:"gender" validate:"omitempty"`
	LookingForGender      int     `json:"lookingForGender" validate:"required"`
	Age                   int     `json:"age" validate:"required"`
	LookingForAgeMin      int     `json:"lookingForAgeMin" validate:"required"`
	LookingForAgeMax      int     `json:"lookingForAgeMax" validate:"required"`
	LookingForDistanceMax int     `json:"lookingForDistanceMax" validate:"required"`
	DistanceUnit          string  `json:"distanceUnit" validate:"required"`
	Lat                   float64 `json:"lat" validate:"required"`
	Lon                   float64 `json:"lon" validate:"required"`
	Birthday              string  `json:"birthday" validate:"omitempty"`
	Country               string  `json:"country" validate:"required"`
	City                  string  `json:"city" validate:"required"`
	SuperPower            string  `json:"superpower" validate:"required"`
	AccountType           string  `json:"accountType" validate:"required"`
	IsDeleted             bool    `json:"isDeleted" validate:"omitempty"`
	DeletedAt             string  `json:"deletedAt" validate:"omitempty"`
	IsBlocked             bool    `json:"isBlocked" validate:"omitempty"`
	BlockedAt             string  `json:"blockedAt" validate:"omitempty"`
	UpdatedAt             string  `json:"updatedAt" validate:"omitempty"`
	CreatedAt             string  `json:"createdAt" validate:"omitempty"`
}

func (Superhero) Validate

func (s Superhero) Validate() error

Validate validates that all fields are present.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳