Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

connectionString

connectionString: string

The MongoDB connection string used to connect to the database and read/write to it

db

db: Connection

mongoose

mongoose: mongoose.Mongoose

name

name: string = "MongoDB"

type

type: Type = Plugin.Type.DATABASE

Methods

connect

  • connect(): Promise<Connection>

deleteUser

  • deleteUser(usernameOrID: string): Promise<void>

getMatch

  • getMatch(id: NanoID): Promise<any>

getPlayerMatches

  • getPlayerMatches(usernameOrID: nanoid, governID: nanoid, offset?: number, limit?: number, order?: number): Promise<Array<Match>>

getTournamentConfigs

getTournamentConfigsModificationDate

  • getTournamentConfigsModificationDate(tournamentID: nanoid): Promise<Date>

getUser

  • getUser(usernameOrID: string, publicView?: boolean): Promise<User>

getUsersInTournament

  • getUsersInTournament(tournamentKey: string, offset?: number, limit?: number): Promise<Array<User>>

initialize

  • initialize(): Promise<void>

isAdmin

loginUser

  • loginUser(username: string, password: string): Promise<string>

manipulate

  • manipulate(dimension: Dimension): Promise<void>

registerUser

  • registerUser(username: string, password: string, userData?: any): Promise<any>

storeMatch

  • storeMatch(match: Match, governID: nanoid): Promise<any>

storeTournamentConfigs

updateUser

  • updateUser(usernameOrID: string, update: Partial<User>): Promise<User>

verifyToken

  • verifyToken(jwt: string): Promise<string>

Object literals

configs

configs: object

Default configs

saveMatches

saveMatches: true = true

saveTournamentMatches

saveTournamentMatches: true = true

models

models: object

match

match: null = null

tournamentConfigs

tournamentConfigs: null = null

user

user: null = null

Generated using TypeDoc