models

package
v0.0.0-...-b20ddf7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserCollection *mongo.Collection

UserCollection | @desc: the user ccollection on the database

Functions

func CreateUser

func CreateUser(Name string, Email string)

CreateUserSchema @desc: adds schema validation and indexes to collection

Types

type User

type User struct {
	Id    primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"`
	Name  string             `json:"name,omitempty" bson:"name,omitempty" validate:"required"`
	Email string             `json:"email,omitempty" bson:"email,omitempty" validate:"required"`
}

User | @desc: user model struct

Jump to

Keyboard shortcuts

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