models

package
v0.0.0-...-a4a6259 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MONGODB NAME FOR GBA ACCOUNT/SAVE DATA
	GBADB = "azgba_test1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GBASave

type GBASave struct {
	ID         string `json:"id" bson:"_id"`
	Owner      string `json:"owner" bson:"owner"`
	Name       string `json:"name" bson:"name"`
	Save       []byte `json:"save" bson:"save"`
	LastUpdate int64  `json:"last_update" bson:"last_update,omitempty"`
}

func NewGBASave

func NewGBASave(owner, name string, save []byte) *GBASave

type JWTCustomClaims

type JWTCustomClaims struct {
	Name  string        `json:"name"`
	Admin bool          `json:"admin"`
	ID    bson.ObjectId `json:"id"`
	Exp   int64         `json:"exp"`
	jwt.StandardClaims
}

type Post

type Post struct {
	ID      bson.ObjectId `json:"id" bson:"_id,omitempty"`
	To      string        `json:"to" bson:"to"`
	From    string        `json:"from" bson:"from"`
	Message string        `json:"message" bson:"message"`
}

type User

type User struct {
	ID       bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Email    string        `json:"email" bson:"email"`
	Password string        `json:"password,omitempty" bson:"password"`
	UserName string        `json:"username,omitempty" bson:"username"`
	Token    string        `json:"token,omitempty" bson:"-"`
	Saves    []GBASave     `json:"saves,omitempty" bson:"saves,omitempty"`
}

func NewUser

func NewUser(email, pw string) *User

Jump to

Keyboard shortcuts

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