db

package
v0.0.0-...-9984923 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCredential   = errors.New("Invalid username or password.")
	ErrUnavailableUsername = errors.New("Username taken.")
	ErrInternalServer      = errors.New("Internal server error.")
	ErrNoSuchProblem       = errors.New("No such problem.")
)

Functions

func Authenticate

func Authenticate(cred Credential) (bson.M, error)

func CreateProblem

func CreateProblem(p ProblemData) (string, error)

func DeleteProblem

func DeleteProblem(pid ProblemID) error

func EditProblem

func EditProblem(p Problem) error

func FullProblem

func FullProblem(id string) (Problem, error)

func IOProblem

func IOProblem(id string) (ProblemIO, error)

func Problems

func Problems() ([]ProblemSnap, error)

func Register

func Register(cred Credential, data bson.M) error

func SnapProblem

func SnapProblem(id string) (ProblemSnap, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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