db

package
v0.0.0-...-36c08b3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB_PATH = os.Getenv("DB_PATH")
	API_DB  = &DB{
		data: make(map[string]Club),
	}
)

Functions

This section is empty.

Types

type Club

type Club struct {
	Name     string `json:"name"`
	Goals    int    `json:"goals"`
	Avatar   string `json:"avatar"`
	Trophies int    `json:"trophies"`
	League   string `json:"league"`
	Position int    `json:"position"`
	Code     string `json:"code"`
}

type DB

type DB struct {
	// contains filtered or unexported fields
}

func GetDB

func GetDB() *DB

func InitDB

func InitDB() (*DB, error)

func (*DB) GetClub

func (db *DB) GetClub(code string) (Club, bool)

func (*DB) GetClubs

func (db *DB) GetClubs() []Club

func (*DB) LoadDB

func (db *DB) LoadDB() error

Jump to

Keyboard shortcuts

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