Documentation ¶ Index ¶ Variables type Club type DB func GetDB() *DB func InitDB() (*DB, error) func (db *DB) GetClub(code string) (Club, bool) func (db *DB) GetClubs() []Club func (db *DB) LoadDB() error 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 Source Files ¶ View all Source files db.go Click to show internal directories. Click to hide internal directories.