models

package
v0.0.0-...-b8f6be9 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// GBADB - db name used for mongo
	GBADB = "GBA SAVE MONGODB NAME"
)

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"`
}

GBASave - CLOUD SAVE DATA STRUCT

func NewGBASave

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

NewGBASave - RETURNS NEW GBA SAVE

type JWTCustomClaims

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

JWTCustomClaims - JSON WEB TOKEN CUSTOM CLAIMS

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"`
}

User - A GBAPI CLOUD SAVE USER

func NewUser

func NewUser(email, pw string) *User

NewUser - RETURNS A NEW GBAPI CLOUD SAVE USER

Jump to

Keyboard shortcuts

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