data

package
v0.0.0-...-2bbbb8e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorUserNotFound = fmt.Errorf("User not found")

Functions

This section is empty.

Types

type StatusType

type StatusType string

StatusType of a status

const (
	Online  StatusType = "Online"
	Offline StatusType = "Offline"
	InLobby StatusType = "InLobby"
	InGame  StatusType = "InGame"
)

type User

type User struct {
	ID           string     `json:"id" bson:"_id"`
	Username     string     `json:"username" validate:"required"`
	Email        string     `json:"email" validate:"required,email"`
	FirstName    string     `json:"firstname"`
	LastName     string     `json:"lastname"`
	DateOfBirth  string     `json:"dateofbirth"`
	Status       StatusType `json:"status" validate:"isStatusType"`
	Gender       string     `json:"gender"`
	Address      string     `json:"address"`
	Bio          string     `json:"bio"`
	Achievements string     `json:"achievements"`
}

func (*User) Validate

func (user *User) Validate() error

type Users

type Users []*User

Users is a collection of User

Jump to

Keyboard shortcuts

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