leagues

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Describe

func Describe(league League)

Describe display information about a League

func Display

func Display(uri string, challengeID string, disciplineID string, levelID string) error

Display will fetch results and print them

func ListLeagues

func ListLeagues() []string

ListLeagues return an array of available Leagues names

func RegisterLeague

func RegisterLeague(name string, f LeagueFunc)

RegisterLeague set a new League constructor

Types

type League

type League interface {

	// Details send informations about the league
	Details() map[string]string

	// Display will print results on stdout
	Display(challengeID string, disciplineID string, levelID string) error

	// Challenges retrieve available challenges
	Challenges() map[string]string

	// Levels retrieve available levels
	Levels() map[string]string

	// Disciplines retrieve available pelota disciplines
	Disciplines() map[string]string
}

League define a pelote league

func New

func New(name string) (League, error)

New find for a League with a name

type LeagueFunc

type LeagueFunc func() (League, error)

LeagueFunc is a constructor for League

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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