database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: AGPL-3.0, AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BurnInvite

func BurnInvite(code string) error

func Connect

func Connect() error

func Remove

func Remove(email string) error

func Synchronize

func Synchronize()

func UnburnInvite

func UnburnInvite(code string) error

Types

type Invite

type Invite struct {
	ID     uint64 `db:"id"`
	Code   string `db:"code"`
	Burned bool   `db:"burned"`
}

type Login

type Login struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Profile

type Profile struct {
	ID                uint64   `db:"id" json:"id"`
	UUID              string   `db:"uuid" json:"uuid,omitempty"`
	Username          string   `json:"name,omitempty"`
	Groups            []string `json:"groups,omitempty"`
	Experience        uint64   `db:"experience" json:"experience"`
	Level             uint64   `db:"level" json:"level"`
	TotalScore        uint64   `db:"total_score" json:"total_score"`
	PlayCount         uint64   `db:"play_count" json:"play_count"`
	Mastery           uint8    `db:"mastery" json:"mastery"`
	PerformanceRating uint64   `db:"performance_rating" json:"performance_rating"`
}

func SelectProfileById

func SelectProfileById(id uint64) (error, *Profile)

func (*Profile) New

func (p *Profile) New() error

type Registration

type Registration struct {
	Username   string `json:"username"`
	Email      string `json:"email"`
	Password   string `json:"password"`
	InviteCode string `json:"invite_code,omitempty"`
}

type ReqList

type ReqList struct {
	Email string `db:"email" json:"email,omitempty"`
}

func (*ReqList) New

func (r *ReqList) New() error

Jump to

Keyboard shortcuts

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