database

package
v0.0.0-...-b215fe8 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllAveragesForGolfer

func GetAllAveragesForGolfer(golferId string) (map[string]float64, error)

func GetAllRoundsForGolfer

func GetAllRoundsForGolfer(golferId string) (map[string]int, error)

func GetCourseById

func GetCourseById(id string) (model.GolfCourse, error)

For Testing

func GetCourses

func GetCourses() ([]model.GolfCourse, error)

func GetGolferAverage

func GetGolferAverage(golferId string, courseId string) (float64, error)

func GetGolferById

func GetGolferById(golferId string) (model.Golfer, error)

For Testing

func GetGolferNumRounds

func GetGolferNumRounds(golferId string, courseId string) (int, error)

func GetGolferWins

func GetGolferWins(golferId string) (map[string]int, error)

func GetGolfers

func GetGolfers() ([]model.Golfer, error)

func GetScoreInfoFromColId

func GetScoreInfoFromColId(columnName string) (string, string)

colScoreQual -> courseId.date.timestamp

func GetScoresForGolfer

func GetScoresForGolfer(golferId string) (map[string]map[string]int, error)

func GetStatInfoFromColId

func GetStatInfoFromColId(columnName string) (string, string)

stat col qual -> type.courseId type -> rds or avg

func IncGolferTotalRounds

func IncGolferTotalRounds(golferId string) error

func InitHBase

func InitHBase(hbaseConfig util.HBaseConfig)

func InitSQL

func InitSQL(dbConfig util.SQLConfig)

func PutRound

func PutRound(round model.Round) error

func ResetUser

func ResetUser(golferId string) error

func SetGolferAverage

func SetGolferAverage(golferId string, courseId string, average float64) error

func SetGolferNumRounds

func SetGolferNumRounds(golferId string, courseId string, rounds int) error

func SetGolferWins

func SetGolferWins(golferId string, wins map[string]int) error

func Test

func Test(test_val string) error

func TryClose

func TryClose()

Types

This section is empty.

Jump to

Keyboard shortcuts

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