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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() error

func Remove

func Remove(id, tid uint64) error

func Synchronize

func Synchronize()

Types

type Board

type Board struct {
	TrackID          uint64    `db:"track_id" json:"track_id,omitempty"`
	ID               uint64    `db:"id" json:"id,omitempty"`
	DateCreated      time.Time `db:"date_created" json:"date_created,omitempty"`
	DateModified     time.Time `db:"date_modified" json:"date_modified,omitempty"`
	SHA3             string    `db:"sha3" json:"sha3,omitempty"`
	Jacket           string    `db:"jacket" json:"jacket,omitempty"`
	Illustrators     string    `db:"illustrators" json:"illustrators,omitempty"`
	Charters         string    `db:"charters" json:"charters,omitempty"`
	DifficultyName   uint64    `db:"difficulty_name" json:"difficulty_name"`
	DifficultyRating uint8     `db:"difficulty_rating" json:"difficulty_rating"`
}

func SelectByHash

func SelectByHash(hash string) (*Board, error)

func SelectID

func SelectID(id uint64) (*Board, error)

func SelectTrackID

func SelectTrackID(id uint64) ([]*Board, error)

func (*Board) Edit

func (b *Board) Edit(id uint64) error

func (*Board) New

func (b *Board) New() error

func (*Board) Update

func (b *Board) Update() error

Jump to

Keyboard shortcuts

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