database

package
v0.0.0-...-93a5048 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: EUPL-1.2 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close SQLite3 database used by Store.

func Open

func Open(path string) (err error)

Open an SQLite3 database at the specified path.

Types

type Athlete

type Athlete struct {
	Slug      string `json:"slug"`
	Name      string `json:"name"`
	Gender    string `json:"gender"`
	Age       uint8  `json:"age"`
	Sport     string `json:"sport"`
	FamousFor string `json:"famous_for"`
}

func GetAthlete

func GetAthlete(slug string) (Athlete, error)

func GetAthletes

func GetAthletes() ([]Athlete, error)

func GetRandomAthlete

func GetRandomAthlete() (Athlete, error)
func Search(t SearchType, q string) ([]Athlete, error)

type SearchType

type SearchType int
const (
	SearchByName SearchType = iota
	SearchBySport
	SearchByFamousFor
)

Jump to

Keyboard shortcuts

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