models

package
v0.0.0-...-e6a6499 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes []RoutePrefix

Functions

This section is empty.

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
	Protected   bool
}

type RoutePrefix

type RoutePrefix struct {
	Prefix    string
	SubRoutes []Route
}

type User

type User struct {
	ID        bson.ObjectId `bson:"_id" json:"_id"`
	Firstname string        `bson:"firstname" json:"firstname"`
	Lastname  string        `bson:"lastname" json:"lastname"`
	Age       int           `bson:"age" json:"age"`
	Email     string        `bson:"email" json:"email"`
	Username  string        `bson:"username" json:"username"`
	Password  string        `bson:"password,omitempty" json:"password,omitempty"`
	Verify    bool          `bson:"verify" json:"verify" default:"false"`
	Url       string        `bson:"url,omitempty" json:"url,omitempty"`
}

Represents a user, we uses bson keyword to tell the mgo driver how to name the properties in mongodb document

Jump to

Keyboard shortcuts

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