db

package
v0.0.0-...-03cefae Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Database holds the connection to the database
	Database *sql.DB
)

Functions

func Connect

func Connect(databaseURL string) error

Connect to the specified database

func GetArma1Users

func GetArma1Users() (*[]User, error)

GetArma1Users returns a llist of users that have Arma1 nick set

func GetArma2Users

func GetArma2Users() (*[]User, error)

GetArma2Users returns a llist of users that have Arma2 nick set

func GetArma3Users

func GetArma3Users() (*[]User, error)

GetArma3Users returns a llist of users that have Arma3 nick set

func GetOfpUsers

func GetOfpUsers() (*[]User, error)

GetOfpUsers returns a llist of users that have Ofp nick set

Types

type Arma

type Arma struct {
	ID   string `json:"id"`
	Nick string `json:"nick"`
}

Arma database model

type User

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Arma Arma   `json:"arma"`
}

User database model

Jump to

Keyboard shortcuts

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