models

package
v0.0.0-...-9f905e9 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Db ...

Functions

func ConnectToDB

func ConnectToDB(conf configs.Configuration)

ConnectToDB ...

func ConnectToTestDB

func ConnectToTestDB()

ConnectToTestDB ..

Types

type Database

type Database struct {
	DBURI      string `json:"dburi"`
	DBName     string `json:"dbname"`
	DBUser     string `json:"dbuser"`
	DBPassword string `json:"dbpassword"`
}

Database represents the information needed to connect to a database

type UserInMongoDb

type UserInMongoDb struct {
	ID       primitive.ObjectID `bson:"_id"`
	Username string             `bson:"username"`
	Password string             `bson:"password"`
	Email    string             `bson:"email"`
	Admin    bool               `bson:"admin"`
}

UserInMongoDb ...

var NilUser UserInMongoDb

NilUser ...

func (UserInMongoDb) GetToken

func (u UserInMongoDb) GetToken() string

GetToken ...

Jump to

Keyboard shortcuts

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