teams

package
v0.0.0-...-9067bdd Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropDatabase

func DropDatabase(uri string, db string) error

func LoadTeams

func LoadTeams(uri string, db string, teams []Team) error

LoadTeams ...

func RootSchema

func RootSchema() *graphql.Schema

RootSchema return the parsed schema

func Serve

func Serve(portip string, mongo string, db string)

Run : start the GraphQL server

Types

type Team

type Team struct {
	ID       string `json:"ID"`
	Name     string `json:"name"`
	Location string `json:"location"`
	Year     string `json:"year"`
	Wins     int    `json:"wins"`
	Losses   int    `json:"losses"`
	Ties     int    `json:"ties"`
	Other    int    `json:"other"`
	Games    int    `json:"games"`
	UUID     string `json:"uuid"`
}

Team ...

func QueryTeams

func QueryTeams(uri string, db string, key string, value string) ([]Team, error)

QueryTeams

func ReadTeams

func ReadTeams(fname string) ([]Team, error)

ReadTeam - reads the json file and returns a slice of data

Jump to

Keyboard shortcuts

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