mongo

package
v0.0.0-...-222756a Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(client *mongo.Database, log *log.Logger)

func NewClient

func NewClient(ctx context.Context, host, port, username, password, database, authSource string) (*mongo.Database, error)

Types

type UserGameJSON

type UserGameJSON struct {
	PointsGained int    `json:"points_gained,string"`
	WinStatus    int8   `json:"win_status,string"`
	GameType     int8   `json:"game_type,string"`
	Created      string `json:"created"`
}

type UserJSON

type UserJSON struct {
	Email     string `json:"email" binding:"required" validate:"email"`
	LastName  string `json:"last_name" binding:"required"`
	Country   string `json:"country" binding:"required"`
	City      string `json:"city" binding:"required"`
	Gender    string `json:"gender" binding:"required"`
	BirthDate string `json:"birth_date" binding:"required"`
}

Jump to

Keyboard shortcuts

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