databank

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllstarFull

type AllstarFull struct {
	Playerid    string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid      int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Gamenum     int    `json:"gameNum"  csv:"gameNum"  db:"gameNum"  bson:"gameNum"`
	Gameid      string `json:"gameID"  csv:"gameID"  db:"gameID,omitempty"  bson:"gameID"`
	Teamid      string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid        string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Gp          int    `json:"gP"  csv:"GP"  db:"GP"  bson:"GP"`
	Startingpos int    `json:"startingPos"  csv:"startingPos"  db:"startingPos"  bson:"startingPos"`
	// contains filtered or unexported fields
}

AllstarFull is a model that maps the CSV to a DB Table

func (*AllstarFull) GenParseAndStoreCSV

func (m *AllstarFull) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*AllstarFull) GetFileName

func (m *AllstarFull) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*AllstarFull) GetFilePath

func (m *AllstarFull) GetFilePath() string

GetFilePath returns the path of the source file

func (*AllstarFull) GetTableName

func (m *AllstarFull) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*AllstarFull) SetInputDirectory

func (m *AllstarFull) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Appearances

type Appearances struct {
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Teamid   string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Gall     int    `json:"gall"  csv:"G_all"  db:"G_all"  bson:"G_all"`
	Gs       int    `json:"gS"  csv:"GS"  db:"GS"  bson:"GS"`
	Gbatting int    `json:"gbatting"  csv:"G_batting"  db:"G_batting"  bson:"G_batting"`
	Gdefense int    `json:"gdefense"  csv:"G_defense"  db:"G_defense"  bson:"G_defense"`
	Gp       int    `json:"gp"  csv:"G_p"  db:"G_p"  bson:"G_p"`
	Gc       int    `json:"gc"  csv:"G_c"  db:"G_c"  bson:"G_c"`
	G1B      int    `json:"g1b"  csv:"G_1b"  db:"G_1b"  bson:"G_1b"`
	G2B      int    `json:"g2b"  csv:"G_2b"  db:"G_2b"  bson:"G_2b"`
	G3B      int    `json:"g3b"  csv:"G_3b"  db:"G_3b"  bson:"G_3b"`
	Gss      int    `json:"gss"  csv:"G_ss"  db:"G_ss"  bson:"G_ss"`
	Glf      int    `json:"glf"  csv:"G_lf"  db:"G_lf"  bson:"G_lf"`
	Gcf      int    `json:"gcf"  csv:"G_cf"  db:"G_cf"  bson:"G_cf"`
	Grf      int    `json:"grf"  csv:"G_rf"  db:"G_rf"  bson:"G_rf"`
	Gof      int    `json:"gof"  csv:"G_of"  db:"G_of"  bson:"G_of"`
	Gdh      int    `json:"gdh"  csv:"G_dh"  db:"G_dh"  bson:"G_dh"`
	Gph      int    `json:"gph"  csv:"G_ph"  db:"G_ph"  bson:"G_ph"`
	Gpr      int    `json:"gpr"  csv:"G_pr"  db:"G_pr"  bson:"G_pr"`
	// contains filtered or unexported fields
}

Appearances is a model that maps the CSV to a DB Table

func (*Appearances) GenParseAndStoreCSV

func (m *Appearances) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Appearances) GetFileName

func (m *Appearances) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Appearances) GetFilePath

func (m *Appearances) GetFilePath() string

GetFilePath returns the path of the source file

func (*Appearances) GetTableName

func (m *Appearances) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Appearances) SetInputDirectory

func (m *Appearances) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type AwardsManagers

type AwardsManagers struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Awardid  string `json:"awardID"  csv:"awardID"  db:"awardID,omitempty"  bson:"awardID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Tie      string `json:"tie"  csv:"tie"  db:"tie,omitempty"  bson:"tie"`
	Notes    string `json:"notes"  csv:"notes"  db:"notes,omitempty"  bson:"notes"`
	// contains filtered or unexported fields
}

AwardsManagers is a model that maps the CSV to a DB Table

func (*AwardsManagers) GenParseAndStoreCSV

func (m *AwardsManagers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*AwardsManagers) GetFileName

func (m *AwardsManagers) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*AwardsManagers) GetFilePath

func (m *AwardsManagers) GetFilePath() string

GetFilePath returns the path of the source file

func (*AwardsManagers) GetTableName

func (m *AwardsManagers) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*AwardsManagers) SetInputDirectory

func (m *AwardsManagers) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type AwardsPlayers

type AwardsPlayers struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Awardid  string `json:"awardID"  csv:"awardID"  db:"awardID,omitempty"  bson:"awardID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Tie      string `json:"tie"  csv:"tie"  db:"tie,omitempty"  bson:"tie"`
	Notes    string `json:"notes"  csv:"notes"  db:"notes,omitempty"  bson:"notes"`
	// contains filtered or unexported fields
}

AwardsPlayers is a model that maps the CSV to a DB Table

func (*AwardsPlayers) GenParseAndStoreCSV

func (m *AwardsPlayers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*AwardsPlayers) GetFileName

func (m *AwardsPlayers) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*AwardsPlayers) GetFilePath

func (m *AwardsPlayers) GetFilePath() string

GetFilePath returns the path of the source file

func (*AwardsPlayers) GetTableName

func (m *AwardsPlayers) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*AwardsPlayers) SetInputDirectory

func (m *AwardsPlayers) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type AwardsShareManagers

type AwardsShareManagers struct {
	Awardid    string `json:"awardID"  csv:"awardID"  db:"awardID,omitempty"  bson:"awardID"`
	Yearid     int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Lgid       string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Playerid   string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Pointswon  int    `json:"pointsWon"  csv:"pointsWon"  db:"pointsWon"  bson:"pointsWon"`
	Pointsmax  int    `json:"pointsMax"  csv:"pointsMax"  db:"pointsMax"  bson:"pointsMax"`
	Votesfirst int    `json:"votesFirst"  csv:"votesFirst"  db:"votesFirst"  bson:"votesFirst"`
	// contains filtered or unexported fields
}

AwardsShareManagers is a model that maps the CSV to a DB Table

func (*AwardsShareManagers) GenParseAndStoreCSV

func (m *AwardsShareManagers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*AwardsShareManagers) GetFileName

func (m *AwardsShareManagers) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*AwardsShareManagers) GetFilePath

func (m *AwardsShareManagers) GetFilePath() string

GetFilePath returns the path of the source file

func (*AwardsShareManagers) GetTableName

func (m *AwardsShareManagers) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*AwardsShareManagers) SetInputDirectory

func (m *AwardsShareManagers) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type AwardsSharePlayers

type AwardsSharePlayers struct {
	Awardid    string  `json:"awardID"  csv:"awardID"  db:"awardID,omitempty"  bson:"awardID"`
	Yearid     int     `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Lgid       string  `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Playerid   string  `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Pointswon  float64 `json:"pointsWon"  csv:"pointsWon"  db:"pointsWon"  bson:"pointsWon"`
	Pointsmax  int     `json:"pointsMax"  csv:"pointsMax"  db:"pointsMax"  bson:"pointsMax"`
	Votesfirst float64 `json:"votesFirst"  csv:"votesFirst"  db:"votesFirst"  bson:"votesFirst"`
	// contains filtered or unexported fields
}

AwardsSharePlayers is a model that maps the CSV to a DB Table

func (*AwardsSharePlayers) GenParseAndStoreCSV

func (m *AwardsSharePlayers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*AwardsSharePlayers) GetFileName

func (m *AwardsSharePlayers) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*AwardsSharePlayers) GetFilePath

func (m *AwardsSharePlayers) GetFilePath() string

GetFilePath returns the path of the source file

func (*AwardsSharePlayers) GetTableName

func (m *AwardsSharePlayers) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*AwardsSharePlayers) SetInputDirectory

func (m *AwardsSharePlayers) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Batting

type Batting struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Stint    int    `json:"stint"  csv:"stint"  db:"stint"  bson:"stint"`
	Teamid   string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	G        int    `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Ab       int    `json:"aB"  csv:"AB"  db:"AB"  bson:"AB"`
	R        int    `json:"r"  csv:"R"  db:"R"  bson:"R"`
	H        int    `json:"h"  csv:"H"  db:"H"  bson:"H"`
	Doubles  int    `json:"doubles"  csv:"2B"  db:"doubles"  bson:"doubles"`
	Triples  int    `json:"triples"  csv:"3B"  db:"triples"  bson:"triples"`
	Hr       int    `json:"hR"  csv:"HR"  db:"HR"  bson:"HR"`
	Rbi      int    `json:"rBI"  csv:"RBI"  db:"RBI"  bson:"RBI"`
	Sb       int    `json:"sB"  csv:"SB"  db:"SB"  bson:"SB"`
	Cs       int    `json:"cS"  csv:"CS"  db:"CS"  bson:"CS"`
	Bb       int    `json:"bB"  csv:"BB"  db:"BB"  bson:"BB"`
	So       int    `json:"sO"  csv:"SO"  db:"SO"  bson:"SO"`
	Ibb      int    `json:"iBB"  csv:"IBB"  db:"IBB"  bson:"IBB"`
	Hbp      int    `json:"hBP"  csv:"HBP"  db:"HBP"  bson:"HBP"`
	Sh       int    `json:"sH"  csv:"SH"  db:"SH"  bson:"SH"`
	Sf       int    `json:"sF"  csv:"SF"  db:"SF"  bson:"SF"`
	Gidp     int    `json:"gIDP"  csv:"GIDP"  db:"GIDP"  bson:"GIDP"`
	// contains filtered or unexported fields
}

Batting is a model that maps the CSV to a DB Table

func (*Batting) GenParseAndStoreCSV

func (m *Batting) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Batting) GetFileName

func (m *Batting) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Batting) GetFilePath

func (m *Batting) GetFilePath() string

GetFilePath returns the path of the source file

func (*Batting) GetTableName

func (m *Batting) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Batting) SetInputDirectory

func (m *Batting) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type BattingPost

type BattingPost struct {
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Round    string `json:"round"  csv:"round"  db:"round,omitempty"  bson:"round"`
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Teamid   string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	G        int    `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Ab       int    `json:"aB"  csv:"AB"  db:"AB"  bson:"AB"`
	R        int    `json:"r"  csv:"R"  db:"R"  bson:"R"`
	H        int    `json:"h"  csv:"H"  db:"H"  bson:"H"`
	Doubles  int    `json:"doubles"  csv:"2B"  db:"doubles"  bson:"doubles"`
	Triples  int    `json:"triples"  csv:"3B"  db:"triples"  bson:"triples"`
	Hr       int    `json:"hR"  csv:"HR"  db:"HR"  bson:"HR"`
	Rbi      int    `json:"rBI"  csv:"RBI"  db:"RBI"  bson:"RBI"`
	Sb       int    `json:"sB"  csv:"SB"  db:"SB"  bson:"SB"`
	Cs       int    `json:"cS"  csv:"CS"  db:"CS"  bson:"CS"`
	Bb       int    `json:"bB"  csv:"BB"  db:"BB"  bson:"BB"`
	So       int    `json:"sO"  csv:"SO"  db:"SO"  bson:"SO"`
	Ibb      int    `json:"iBB"  csv:"IBB"  db:"IBB"  bson:"IBB"`
	Hbp      int    `json:"hBP"  csv:"HBP"  db:"HBP"  bson:"HBP"`
	Sh       int    `json:"sH"  csv:"SH"  db:"SH"  bson:"SH"`
	Sf       int    `json:"sF"  csv:"SF"  db:"SF"  bson:"SF"`
	Gidp     int    `json:"gIDP"  csv:"GIDP"  db:"GIDP"  bson:"GIDP"`
	// contains filtered or unexported fields
}

BattingPost is a model that maps the CSV to a DB Table

func (*BattingPost) GenParseAndStoreCSV

func (m *BattingPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*BattingPost) GetFileName

func (m *BattingPost) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*BattingPost) GetFilePath

func (m *BattingPost) GetFilePath() string

GetFilePath returns the path of the source file

func (*BattingPost) GetTableName

func (m *BattingPost) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*BattingPost) SetInputDirectory

func (m *BattingPost) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type CollegePlaying

type CollegePlaying struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Schoolid string `json:"schoolID"  csv:"schoolID"  db:"schoolID,omitempty"  bson:"schoolID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	// contains filtered or unexported fields
}

CollegePlaying is a model that maps the CSV to a DB Table

func (*CollegePlaying) GenParseAndStoreCSV

func (m *CollegePlaying) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*CollegePlaying) GetFileName

func (m *CollegePlaying) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*CollegePlaying) GetFilePath

func (m *CollegePlaying) GetFilePath() string

GetFilePath returns the path of the source file

func (*CollegePlaying) GetTableName

func (m *CollegePlaying) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*CollegePlaying) SetInputDirectory

func (m *CollegePlaying) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Fielding

type Fielding struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Stint    int    `json:"stint"  csv:"stint"  db:"stint"  bson:"stint"`
	Teamid   string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Pos      string `json:"pOS"  csv:"POS"  db:"POS,omitempty"  bson:"POS"`
	G        int    `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Gs       int    `json:"gS"  csv:"GS"  db:"GS"  bson:"GS"`
	Innouts  int    `json:"innOuts"  csv:"InnOuts"  db:"InnOuts"  bson:"InnOuts"`
	Po       int    `json:"pO"  csv:"PO"  db:"PO"  bson:"PO"`
	A        int    `json:"a"  csv:"A"  db:"A"  bson:"A"`
	E        int    `json:"e"  csv:"E"  db:"E"  bson:"E"`
	Dp       int    `json:"dP"  csv:"DP"  db:"DP"  bson:"DP"`
	Pb       int    `json:"pB"  csv:"PB"  db:"PB"  bson:"PB"`
	Wp       int    `json:"wP"  csv:"WP"  db:"WP"  bson:"WP"`
	Sb       int    `json:"sB"  csv:"SB"  db:"SB"  bson:"SB"`
	Cs       int    `json:"cS"  csv:"CS"  db:"CS"  bson:"CS"`
	Zr       int    `json:"zR"  csv:"ZR"  db:"ZR"  bson:"ZR"`
	// contains filtered or unexported fields
}

Fielding is a model that maps the CSV to a DB Table

func (*Fielding) GenParseAndStoreCSV

func (m *Fielding) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Fielding) GetFileName

func (m *Fielding) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Fielding) GetFilePath

func (m *Fielding) GetFilePath() string

GetFilePath returns the path of the source file

func (*Fielding) GetTableName

func (m *Fielding) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Fielding) SetInputDirectory

func (m *Fielding) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type FieldingOF

type FieldingOF struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Stint    int    `json:"stint"  csv:"stint"  db:"stint"  bson:"stint"`
	Glf      int    `json:"glf"  csv:"Glf"  db:"Glf"  bson:"Glf"`
	Gcf      int    `json:"gcf"  csv:"Gcf"  db:"Gcf"  bson:"Gcf"`
	Grf      int    `json:"grf"  csv:"Grf"  db:"Grf"  bson:"Grf"`
	// contains filtered or unexported fields
}

FieldingOF is a model that maps the CSV to a DB Table

func (*FieldingOF) GenParseAndStoreCSV

func (m *FieldingOF) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*FieldingOF) GetFileName

func (m *FieldingOF) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*FieldingOF) GetFilePath

func (m *FieldingOF) GetFilePath() string

GetFilePath returns the path of the source file

func (*FieldingOF) GetTableName

func (m *FieldingOF) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*FieldingOF) SetInputDirectory

func (m *FieldingOF) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type FieldingOFsplit

type FieldingOFsplit struct {
	Playerid string  `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int     `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Stint    int     `json:"stint"  csv:"stint"  db:"stint"  bson:"stint"`
	Teamid   string  `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string  `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Pos      string  `json:"pOS"  csv:"POS"  db:"POS,omitempty"  bson:"POS"`
	G        int     `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Gs       int     `json:"gS"  csv:"GS"  db:"GS"  bson:"GS"`
	Innouts  int     `json:"innOuts"  csv:"InnOuts"  db:"InnOuts"  bson:"InnOuts"`
	Po       float32 `json:"pO"  csv:"PO"  db:"PO"  bson:"PO"`
	A        float32 `json:"a"  csv:"A"  db:"A"  bson:"A"`
	E        float32 `json:"e"  csv:"E"  db:"E"  bson:"E"`
	Dp       float32 `json:"dP"  csv:"DP"  db:"DP"  bson:"DP"`
	Pb       string  `json:"pB"  csv:"PB"  db:"PB,omitempty"  bson:"PB"`
	Wp       string  `json:"wP"  csv:"WP"  db:"WP,omitempty"  bson:"WP"`
	Sb       string  `json:"sB"  csv:"SB"  db:"SB,omitempty"  bson:"SB"`
	Cs       string  `json:"cS"  csv:"CS"  db:"CS,omitempty"  bson:"CS"`
	Zr       string  `json:"zR"  csv:"ZR"  db:"ZR,omitempty"  bson:"ZR"`
	// contains filtered or unexported fields
}

FieldingOFsplit is a model that maps the CSV to a DB Table

func (*FieldingOFsplit) GenParseAndStoreCSV

func (m *FieldingOFsplit) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*FieldingOFsplit) GetFileName

func (m *FieldingOFsplit) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*FieldingOFsplit) GetFilePath

func (m *FieldingOFsplit) GetFilePath() string

GetFilePath returns the path of the source file

func (*FieldingOFsplit) GetTableName

func (m *FieldingOFsplit) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*FieldingOFsplit) SetInputDirectory

func (m *FieldingOFsplit) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type FieldingPost

type FieldingPost struct {
	Playerid string  `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int     `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Teamid   string  `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string  `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Round    string  `json:"round"  csv:"round"  db:"round,omitempty"  bson:"round"`
	Pos      string  `json:"pOS"  csv:"POS"  db:"POS,omitempty"  bson:"POS"`
	G        int     `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Gs       int     `json:"gS"  csv:"GS"  db:"GS"  bson:"GS"`
	Innouts  float32 `json:"innOuts"  csv:"InnOuts"  db:"InnOuts"  bson:"InnOuts"`
	Po       int     `json:"pO"  csv:"PO"  db:"PO"  bson:"PO"`
	A        int     `json:"a"  csv:"A"  db:"A"  bson:"A"`
	E        int     `json:"e"  csv:"E"  db:"E"  bson:"E"`
	Dp       int     `json:"dP"  csv:"DP"  db:"DP"  bson:"DP"`
	Tp       float32 `json:"tP"  csv:"TP"  db:"TP"  bson:"TP"`
	Pb       int     `json:"pB"  csv:"PB"  db:"PB"  bson:"PB"`
	Sb       int     `json:"sB"  csv:"SB"  db:"SB"  bson:"SB"`
	Cs       int     `json:"cS"  csv:"CS"  db:"CS"  bson:"CS"`
	// contains filtered or unexported fields
}

FieldingPost is a model that maps the CSV to a DB Table

func (*FieldingPost) GenParseAndStoreCSV

func (m *FieldingPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*FieldingPost) GetFileName

func (m *FieldingPost) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*FieldingPost) GetFilePath

func (m *FieldingPost) GetFilePath() string

GetFilePath returns the path of the source file

func (*FieldingPost) GetTableName

func (m *FieldingPost) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*FieldingPost) SetInputDirectory

func (m *FieldingPost) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type HallOfFame

type HallOfFame struct {
	Playerid   string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid     int    `json:"yearID"  csv:"yearid"  db:"yearID"  bson:"yearID"`
	Votedby    string `json:"votedBy"  csv:"votedBy"  db:"votedBy,omitempty"  bson:"votedBy"`
	Ballots    int    `json:"ballots"  csv:"ballots"  db:"ballots"  bson:"ballots"`
	Needed     int    `json:"needed"  csv:"needed"  db:"needed"  bson:"needed"`
	Votes      int    `json:"votes"  csv:"votes"  db:"votes"  bson:"votes"`
	Inducted   string `json:"inducted"  csv:"inducted"  db:"inducted,omitempty"  bson:"inducted"`
	Category   string `json:"category"  csv:"category"  db:"category,omitempty"  bson:"category"`
	Needednote string `json:"needednote"  csv:"needed_note"  db:"needed_note,omitempty"  bson:"needed_note"`
	// contains filtered or unexported fields
}

HallOfFame is a model that maps the CSV to a DB Table

func (*HallOfFame) GenParseAndStoreCSV

func (m *HallOfFame) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*HallOfFame) GetFileName

func (m *HallOfFame) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*HallOfFame) GetFilePath

func (m *HallOfFame) GetFilePath() string

GetFilePath returns the path of the source file

func (*HallOfFame) GetTableName

func (m *HallOfFame) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*HallOfFame) SetInputDirectory

func (m *HallOfFame) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type HomeGames

type HomeGames struct {
	Yearkey    int    `json:"yearkey"  csv:"year.key"  db:"yearkey"  bson:"yearkey"`
	Leaguekey  string `json:"leaguekey"  csv:"league.key"  db:"leaguekey,omitempty"  bson:"leaguekey"`
	Teamkey    string `json:"teamkey"  csv:"team.key"  db:"teamkey,omitempty"  bson:"teamkey"`
	Parkkey    string `json:"parkkey"  csv:"park.key"  db:"parkkey,omitempty"  bson:"parkkey"`
	Spanfirst  string `json:"spanfirst"  csv:"span.first"  db:"spanfirst,omitempty"  bson:"spanfirst"`
	Spanlast   string `json:"spanlast"  csv:"span.last"  db:"spanlast,omitempty"  bson:"spanlast"`
	Games      int    `json:"games"  csv:"games"  db:"games"  bson:"games"`
	Openings   int    `json:"openings"  csv:"openings"  db:"openings"  bson:"openings"`
	Attendance int    `json:"attendance"  csv:"attendance"  db:"attendance"  bson:"attendance"`
	// contains filtered or unexported fields
}

HomeGames is a model that maps the CSV to a DB Table

func (*HomeGames) GenParseAndStoreCSV

func (m *HomeGames) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*HomeGames) GetFileName

func (m *HomeGames) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*HomeGames) GetFilePath

func (m *HomeGames) GetFilePath() string

GetFilePath returns the path of the source file

func (*HomeGames) GetTableName

func (m *HomeGames) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*HomeGames) SetInputDirectory

func (m *HomeGames) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Managers

type Managers struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Teamid   string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Inseason int    `json:"inseason"  csv:"inseason"  db:"inseason"  bson:"inseason"`
	G        int    `json:"g"  csv:"G"  db:"G"  bson:"G"`
	W        int    `json:"w"  csv:"W"  db:"W"  bson:"W"`
	L        int    `json:"l"  csv:"L"  db:"L"  bson:"L"`
	Rank     int    `json:"rank"  csv:"rank"  db:"rank"  bson:"rank"`
	Plyrmgr  string `json:"plyrMgr"  csv:"plyrMgr"  db:"plyrMgr,omitempty"  bson:"plyrMgr"`
	// contains filtered or unexported fields
}

Managers is a model that maps the CSV to a DB Table

func (*Managers) GenParseAndStoreCSV

func (m *Managers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Managers) GetFileName

func (m *Managers) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Managers) GetFilePath

func (m *Managers) GetFilePath() string

GetFilePath returns the path of the source file

func (*Managers) GetTableName

func (m *Managers) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Managers) SetInputDirectory

func (m *Managers) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type ManagersHalf

type ManagersHalf struct {
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Teamid   string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Inseason int    `json:"inseason"  csv:"inseason"  db:"inseason"  bson:"inseason"`
	Half     int    `json:"half"  csv:"half"  db:"half"  bson:"half"`
	G        int    `json:"g"  csv:"G"  db:"G"  bson:"G"`
	W        int    `json:"w"  csv:"W"  db:"W"  bson:"W"`
	L        int    `json:"l"  csv:"L"  db:"L"  bson:"L"`
	Rank     int    `json:"rank"  csv:"rank"  db:"rank"  bson:"rank"`
	// contains filtered or unexported fields
}

ManagersHalf is a model that maps the CSV to a DB Table

func (*ManagersHalf) GenParseAndStoreCSV

func (m *ManagersHalf) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*ManagersHalf) GetFileName

func (m *ManagersHalf) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*ManagersHalf) GetFilePath

func (m *ManagersHalf) GetFilePath() string

GetFilePath returns the path of the source file

func (*ManagersHalf) GetTableName

func (m *ManagersHalf) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*ManagersHalf) SetInputDirectory

func (m *ManagersHalf) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Parks

type Parks struct {
	Parkkey   string `json:"parkkey"  csv:"park.key"  db:"parkkey,omitempty"  bson:"parkkey"`
	Parkname  string `json:"parkname"  csv:"park.name"  db:"parkname,omitempty"  bson:"parkname"`
	Parkalias string `json:"parkalias"  csv:"park.alias"  db:"parkalias,omitempty"  bson:"parkalias"`
	City      string `json:"city"  csv:"city"  db:"city,omitempty"  bson:"city"`
	State     string `json:"state"  csv:"state"  db:"state,omitempty"  bson:"state"`
	Country   string `json:"country"  csv:"country"  db:"country,omitempty"  bson:"country"`
	// contains filtered or unexported fields
}

Parks is a model that maps the CSV to a DB Table

func (*Parks) GenParseAndStoreCSV

func (m *Parks) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Parks) GetFileName

func (m *Parks) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Parks) GetFilePath

func (m *Parks) GetFilePath() string

GetFilePath returns the path of the source file

func (*Parks) GetTableName

func (m *Parks) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Parks) SetInputDirectory

func (m *Parks) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type ParseAndStoreCSVFunc

type ParseAndStoreCSVFunc func() error

ParseAndStoreCSVFunc are functions created by the models to parse and store the data from the CSV files. These are needed because the gocsv library didn't like the []interface{} I was passing in.

type People

type People struct {
	Playerid     string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Birthyear    int    `json:"birthYear"  csv:"birthYear"  db:"birthYear"  bson:"birthYear"`
	Birthmonth   int    `json:"birthMonth"  csv:"birthMonth"  db:"birthMonth"  bson:"birthMonth"`
	Birthday     int    `json:"birthDay"  csv:"birthDay"  db:"birthDay"  bson:"birthDay"`
	Birthcountry string `json:"birthCountry"  csv:"birthCountry"  db:"birthCountry,omitempty"  bson:"birthCountry"`
	Birthstate   string `json:"birthState"  csv:"birthState"  db:"birthState,omitempty"  bson:"birthState"`
	Birthcity    string `json:"birthCity"  csv:"birthCity"  db:"birthCity,omitempty"  bson:"birthCity"`
	Deathyear    int    `json:"deathYear"  csv:"deathYear"  db:"deathYear"  bson:"deathYear"`
	Deathmonth   int    `json:"deathMonth"  csv:"deathMonth"  db:"deathMonth"  bson:"deathMonth"`
	Deathday     int    `json:"deathDay"  csv:"deathDay"  db:"deathDay"  bson:"deathDay"`
	Deathcountry string `json:"deathCountry"  csv:"deathCountry"  db:"deathCountry,omitempty"  bson:"deathCountry"`
	Deathstate   string `json:"deathState"  csv:"deathState"  db:"deathState,omitempty"  bson:"deathState"`
	Deathcity    string `json:"deathCity"  csv:"deathCity"  db:"deathCity,omitempty"  bson:"deathCity"`
	Namefirst    string `json:"nameFirst"  csv:"nameFirst"  db:"nameFirst,omitempty"  bson:"nameFirst"`
	Namelast     string `json:"nameLast"  csv:"nameLast"  db:"nameLast,omitempty"  bson:"nameLast"`
	Namegiven    string `json:"nameGiven"  csv:"nameGiven"  db:"nameGiven,omitempty"  bson:"nameGiven"`
	Weight       int    `json:"weight"  csv:"weight"  db:"weight"  bson:"weight"`
	Height       int    `json:"height"  csv:"height"  db:"height"  bson:"height"`
	Bats         string `json:"bats"  csv:"bats"  db:"bats,omitempty"  bson:"bats"`
	Throws       string `json:"throws"  csv:"throws"  db:"throws,omitempty"  bson:"throws"`
	Debut        string `json:"debut"  csv:"debut"  db:"debut,omitempty"  bson:"debut"`
	Finalgame    string `json:"finalGame"  csv:"finalGame"  db:"finalGame,omitempty"  bson:"finalGame"`
	Retroid      string `json:"retroID"  csv:"retroID"  db:"retroID,omitempty"  bson:"retroID"`
	Bbrefid      string `json:"bbrefID"  csv:"bbrefID"  db:"bbrefID,omitempty"  bson:"bbrefID"`
	// contains filtered or unexported fields
}

People is a model that maps the CSV to a DB Table

func (*People) GenParseAndStoreCSV

func (m *People) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*People) GetFileName

func (m *People) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*People) GetFilePath

func (m *People) GetFilePath() string

GetFilePath returns the path of the source file

func (*People) GetTableName

func (m *People) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*People) SetInputDirectory

func (m *People) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Pitching

type Pitching struct {
	Playerid string  `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int     `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Stint    int     `json:"stint"  csv:"stint"  db:"stint"  bson:"stint"`
	Teamid   string  `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string  `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	W        int     `json:"w"  csv:"W"  db:"W"  bson:"W"`
	L        int     `json:"l"  csv:"L"  db:"L"  bson:"L"`
	G        int     `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Gs       int     `json:"gS"  csv:"GS"  db:"GS"  bson:"GS"`
	Cg       int     `json:"cG"  csv:"CG"  db:"CG"  bson:"CG"`
	Sho      int     `json:"sHO"  csv:"SHO"  db:"SHO"  bson:"SHO"`
	Sv       int     `json:"sV"  csv:"SV"  db:"SV"  bson:"SV"`
	Ipouts   int     `json:"iPouts"  csv:"IPouts"  db:"IPouts"  bson:"IPouts"`
	H        int     `json:"h"  csv:"H"  db:"H"  bson:"H"`
	Er       int     `json:"eR"  csv:"ER"  db:"ER"  bson:"ER"`
	Hr       int     `json:"hR"  csv:"HR"  db:"HR"  bson:"HR"`
	Bb       int     `json:"bB"  csv:"BB"  db:"BB"  bson:"BB"`
	So       int     `json:"sO"  csv:"SO"  db:"SO"  bson:"SO"`
	Baopp    float64 `json:"bAOpp"  csv:"BAOpp"  db:"BAOpp"  bson:"BAOpp"`
	Era      float64 `json:"eRA"  csv:"ERA"  db:"ERA"  bson:"ERA"`
	Ibb      int     `json:"iBB"  csv:"IBB"  db:"IBB"  bson:"IBB"`
	Wp       int     `json:"wP"  csv:"WP"  db:"WP"  bson:"WP"`
	Hbp      float64 `json:"hBP"  csv:"HBP"  db:"HBP"  bson:"HBP"`
	Bk       int     `json:"bK"  csv:"BK"  db:"BK"  bson:"BK"`
	Bfp      int     `json:"bFP"  csv:"BFP"  db:"BFP"  bson:"BFP"`
	Gf       int     `json:"gF"  csv:"GF"  db:"GF"  bson:"GF"`
	R        int     `json:"r"  csv:"R"  db:"R"  bson:"R"`
	Sh       int     `json:"sH"  csv:"SH"  db:"SH"  bson:"SH"`
	Sf       int     `json:"sF"  csv:"SF"  db:"SF"  bson:"SF"`
	Gidp     int     `json:"gIDP"  csv:"GIDP"  db:"GIDP"  bson:"GIDP"`
	// contains filtered or unexported fields
}

Pitching is a model that maps the CSV to a DB Table

func (*Pitching) GenParseAndStoreCSV

func (m *Pitching) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Pitching) GetFileName

func (m *Pitching) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Pitching) GetFilePath

func (m *Pitching) GetFilePath() string

GetFilePath returns the path of the source file

func (*Pitching) GetTableName

func (m *Pitching) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Pitching) SetInputDirectory

func (m *Pitching) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type PitchingPost

type PitchingPost struct {
	Playerid string  `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Yearid   int     `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Round    string  `json:"round"  csv:"round"  db:"round,omitempty"  bson:"round"`
	Teamid   string  `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string  `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	W        int     `json:"w"  csv:"W"  db:"W"  bson:"W"`
	L        int     `json:"l"  csv:"L"  db:"L"  bson:"L"`
	G        int     `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Gs       int     `json:"gS"  csv:"GS"  db:"GS"  bson:"GS"`
	Cg       int     `json:"cG"  csv:"CG"  db:"CG"  bson:"CG"`
	Sho      int     `json:"sHO"  csv:"SHO"  db:"SHO"  bson:"SHO"`
	Sv       int     `json:"sV"  csv:"SV"  db:"SV"  bson:"SV"`
	Ipouts   int     `json:"iPouts"  csv:"IPouts"  db:"IPouts"  bson:"IPouts"`
	H        int     `json:"h"  csv:"H"  db:"H"  bson:"H"`
	Er       int     `json:"eR"  csv:"ER"  db:"ER"  bson:"ER"`
	Hr       int     `json:"hR"  csv:"HR"  db:"HR"  bson:"HR"`
	Bb       int     `json:"bB"  csv:"BB"  db:"BB"  bson:"BB"`
	So       int     `json:"sO"  csv:"SO"  db:"SO"  bson:"SO"`
	Baopp    float64 `json:"bAOpp"  csv:"BAOpp"  db:"BAOpp"  bson:"BAOpp"`
	Era      float64 `json:"eRA"  csv:"ERA"  db:"ERA"  bson:"ERA"`
	Ibb      int     `json:"iBB"  csv:"IBB"  db:"IBB"  bson:"IBB"`
	Wp       int     `json:"wP"  csv:"WP"  db:"WP"  bson:"WP"`
	Hbp      int     `json:"hBP"  csv:"HBP"  db:"HBP"  bson:"HBP"`
	Bk       int     `json:"bK"  csv:"BK"  db:"BK"  bson:"BK"`
	Bfp      int     `json:"bFP"  csv:"BFP"  db:"BFP"  bson:"BFP"`
	Gf       int     `json:"gF"  csv:"GF"  db:"GF"  bson:"GF"`
	R        int     `json:"r"  csv:"R"  db:"R"  bson:"R"`
	Sh       int     `json:"sH"  csv:"SH"  db:"SH"  bson:"SH"`
	Sf       int     `json:"sF"  csv:"SF"  db:"SF"  bson:"SF"`
	Gidp     int     `json:"gIDP"  csv:"GIDP"  db:"GIDP"  bson:"GIDP"`
	// contains filtered or unexported fields
}

PitchingPost is a model that maps the CSV to a DB Table

func (*PitchingPost) GenParseAndStoreCSV

func (m *PitchingPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*PitchingPost) GetFileName

func (m *PitchingPost) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*PitchingPost) GetFilePath

func (m *PitchingPost) GetFilePath() string

GetFilePath returns the path of the source file

func (*PitchingPost) GetTableName

func (m *PitchingPost) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*PitchingPost) SetInputDirectory

func (m *PitchingPost) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Salaries

type Salaries struct {
	Yearid   int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Teamid   string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Lgid     string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Playerid string `json:"playerID"  csv:"playerID"  db:"playerID,omitempty"  bson:"playerID"`
	Salary   int    `json:"salary"  csv:"salary"  db:"salary"  bson:"salary"`
	// contains filtered or unexported fields
}

Salaries is a model that maps the CSV to a DB Table

func (*Salaries) GenParseAndStoreCSV

func (m *Salaries) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Salaries) GetFileName

func (m *Salaries) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Salaries) GetFilePath

func (m *Salaries) GetFilePath() string

GetFilePath returns the path of the source file

func (*Salaries) GetTableName

func (m *Salaries) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Salaries) SetInputDirectory

func (m *Salaries) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type Schools

type Schools struct {
	Schoolid string `json:"schoolID"  csv:"schoolID"  db:"schoolID,omitempty"  bson:"schoolID"`
	Namefull string `json:"namefull"  csv:"name_full"  db:"name_full,omitempty"  bson:"name_full"`
	City     string `json:"city"  csv:"city"  db:"city,omitempty"  bson:"city"`
	State    string `json:"state"  csv:"state"  db:"state,omitempty"  bson:"state"`
	Country  string `json:"country"  csv:"country"  db:"country,omitempty"  bson:"country"`
	// contains filtered or unexported fields
}

Schools is a model that maps the CSV to a DB Table

func (*Schools) GenParseAndStoreCSV

func (m *Schools) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Schools) GetFileName

func (m *Schools) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Schools) GetFilePath

func (m *Schools) GetFilePath() string

GetFilePath returns the path of the source file

func (*Schools) GetTableName

func (m *Schools) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Schools) SetInputDirectory

func (m *Schools) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type SeriesPost

type SeriesPost struct {
	Yearid       int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Round        string `json:"round"  csv:"round"  db:"round,omitempty"  bson:"round"`
	Teamidwinner string `json:"teamIDwinner"  csv:"teamIDwinner"  db:"teamIDwinner,omitempty"  bson:"teamIDwinner"`
	Lgidwinner   string `json:"lgIDwinner"  csv:"lgIDwinner"  db:"lgIDwinner,omitempty"  bson:"lgIDwinner"`
	Teamidloser  string `json:"teamIDloser"  csv:"teamIDloser"  db:"teamIDloser,omitempty"  bson:"teamIDloser"`
	Lgidloser    string `json:"lgIDloser"  csv:"lgIDloser"  db:"lgIDloser,omitempty"  bson:"lgIDloser"`
	Wins         int    `json:"wins"  csv:"wins"  db:"wins"  bson:"wins"`
	Losses       int    `json:"losses"  csv:"losses"  db:"losses"  bson:"losses"`
	Ties         int    `json:"ties"  csv:"ties"  db:"ties"  bson:"ties"`
	// contains filtered or unexported fields
}

SeriesPost is a model that maps the CSV to a DB Table

func (*SeriesPost) GenParseAndStoreCSV

func (m *SeriesPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*SeriesPost) GetFileName

func (m *SeriesPost) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*SeriesPost) GetFilePath

func (m *SeriesPost) GetFilePath() string

GetFilePath returns the path of the source file

func (*SeriesPost) GetTableName

func (m *SeriesPost) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*SeriesPost) SetInputDirectory

func (m *SeriesPost) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type TableObject

type TableObject interface {
	GetTableName() string
	GetFileName() string
	GetFilePath() string
	GenParseAndStoreCSV(*os.File, db.Repository, csv.ParserFunc) (ParseAndStoreCSVFunc, error)
	SetInputDirectory(string)
}

TableObject is an interface all database related models must implement

func GetTableObjects

func GetTableObjects() []TableObject

GetTableObjects returns an array of pointers to the TableObjects for each table in the Baseball Databank Database

type Teams

type Teams struct {
	Yearid         int     `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Lgid           string  `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Teamid         string  `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Franchid       string  `json:"franchID"  csv:"franchID"  db:"franchID,omitempty"  bson:"franchID"`
	Divid          string  `json:"divID"  csv:"divID"  db:"divID,omitempty"  bson:"divID"`
	Rank           int     `json:"rank"  csv:"Rank"  db:"Rank"  bson:"Rank"`
	G              int     `json:"g"  csv:"G"  db:"G"  bson:"G"`
	Ghome          int     `json:"ghome"  csv:"Ghome"  db:"Ghome"  bson:"Ghome"`
	W              int     `json:"w"  csv:"W"  db:"W"  bson:"W"`
	L              int     `json:"l"  csv:"L"  db:"L"  bson:"L"`
	Divwin         string  `json:"divWin"  csv:"DivWin"  db:"DivWin,omitempty"  bson:"DivWin"`
	Wcwin          string  `json:"wCWin"  csv:"WCWin"  db:"WCWin,omitempty"  bson:"WCWin"`
	Lgwin          string  `json:"lgWin"  csv:"LgWin"  db:"LgWin,omitempty"  bson:"LgWin"`
	Wswin          string  `json:"wSWin"  csv:"WSWin"  db:"WSWin,omitempty"  bson:"WSWin"`
	R              int     `json:"r"  csv:"R"  db:"R"  bson:"R"`
	Ab             int     `json:"aB"  csv:"AB"  db:"AB"  bson:"AB"`
	H              int     `json:"h"  csv:"H"  db:"H"  bson:"H"`
	Doubles        int     `json:"doubles"  csv:"2B"  db:"doubles"  bson:"doubles"`
	Triples        int     `json:"triples"  csv:"3B"  db:"triples"  bson:"triples"`
	Hr             int     `json:"hR"  csv:"HR"  db:"HR"  bson:"HR"`
	Bb             float32 `json:"bB"  csv:"BB"  db:"BB"  bson:"BB"`
	So             int     `json:"sO"  csv:"SO"  db:"SO"  bson:"SO"`
	Sb             float32 `json:"sB"  csv:"SB"  db:"SB"  bson:"SB"`
	Cs             float32 `json:"cS"  csv:"CS"  db:"CS"  bson:"CS"`
	Hbp            float32 `json:"hBP"  csv:"HBP"  db:"HBP"  bson:"HBP"`
	Sf             int     `json:"sF"  csv:"SF"  db:"SF"  bson:"SF"`
	Ra             int     `json:"rA"  csv:"RA"  db:"RA"  bson:"RA"`
	Er             int     `json:"eR"  csv:"ER"  db:"ER"  bson:"ER"`
	Era            float64 `json:"eRA"  csv:"ERA"  db:"ERA"  bson:"ERA"`
	Cg             int     `json:"cG"  csv:"CG"  db:"CG"  bson:"CG"`
	Sho            int     `json:"sHO"  csv:"SHO"  db:"SHO"  bson:"SHO"`
	Sv             int     `json:"sV"  csv:"SV"  db:"SV"  bson:"SV"`
	Ipouts         int     `json:"iPouts"  csv:"IPouts"  db:"IPouts"  bson:"IPouts"`
	Ha             int     `json:"hA"  csv:"HA"  db:"HA"  bson:"HA"`
	Hra            int     `json:"hRA"  csv:"HRA"  db:"HRA"  bson:"HRA"`
	Bba            int     `json:"bBA"  csv:"BBA"  db:"BBA"  bson:"BBA"`
	Soa            int     `json:"sOA"  csv:"SOA"  db:"SOA"  bson:"SOA"`
	E              int     `json:"e"  csv:"E"  db:"E"  bson:"E"`
	Dp             int     `json:"dP"  csv:"DP"  db:"DP"  bson:"DP"`
	Fp             float64 `json:"fP"  csv:"FP"  db:"FP"  bson:"FP"`
	Name           string  `json:"name"  csv:"name"  db:"name,omitempty"  bson:"name"`
	Park           string  `json:"park"  csv:"park"  db:"park,omitempty"  bson:"park"`
	Attendance     int     `json:"attendance"  csv:"attendance"  db:"attendance"  bson:"attendance"`
	Bpf            int     `json:"bPF"  csv:"BPF"  db:"BPF"  bson:"BPF"`
	Ppf            int     `json:"pPF"  csv:"PPF"  db:"PPF"  bson:"PPF"`
	Teamidbr       string  `json:"teamIDBR"  csv:"teamIDBR"  db:"teamIDBR,omitempty"  bson:"teamIDBR"`
	Teamidlahman45 string  `json:"teamIDlahman45"  csv:"teamIDlahman45"  db:"teamIDlahman45,omitempty"  bson:"teamIDlahman45"`
	Teamidretro    string  `json:"teamIDretro"  csv:"teamIDretro"  db:"teamIDretro,omitempty"  bson:"teamIDretro"`
	// contains filtered or unexported fields
}

Teams is a model that maps the CSV to a DB Table

func (*Teams) GenParseAndStoreCSV

func (m *Teams) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*Teams) GetFileName

func (m *Teams) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*Teams) GetFilePath

func (m *Teams) GetFilePath() string

GetFilePath returns the path of the source file

func (*Teams) GetTableName

func (m *Teams) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*Teams) SetInputDirectory

func (m *Teams) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type TeamsFranchises

type TeamsFranchises struct {
	Franchid   string `json:"franchID"  csv:"franchID"  db:"franchID,omitempty"  bson:"franchID"`
	Franchname string `json:"franchName"  csv:"franchName"  db:"franchName,omitempty"  bson:"franchName"`
	Active     string `json:"active"  csv:"active"  db:"active,omitempty"  bson:"active"`
	Naassoc    string `json:"nAassoc"  csv:"NAassoc"  db:"NAassoc,omitempty"  bson:"NAassoc"`
	// contains filtered or unexported fields
}

TeamsFranchises is a model that maps the CSV to a DB Table

func (*TeamsFranchises) GenParseAndStoreCSV

func (m *TeamsFranchises) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*TeamsFranchises) GetFileName

func (m *TeamsFranchises) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*TeamsFranchises) GetFilePath

func (m *TeamsFranchises) GetFilePath() string

GetFilePath returns the path of the source file

func (*TeamsFranchises) GetTableName

func (m *TeamsFranchises) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*TeamsFranchises) SetInputDirectory

func (m *TeamsFranchises) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

type TeamsHalf

type TeamsHalf struct {
	Yearid int    `json:"yearID"  csv:"yearID"  db:"yearID"  bson:"yearID"`
	Lgid   string `json:"lgID"  csv:"lgID"  db:"lgID,omitempty"  bson:"lgID"`
	Teamid string `json:"teamID"  csv:"teamID"  db:"teamID,omitempty"  bson:"teamID"`
	Half   int    `json:"half"  csv:"Half"  db:"Half"  bson:"Half"`
	Divid  string `json:"divID"  csv:"divID"  db:"divID,omitempty"  bson:"divID"`
	Divwin string `json:"divWin"  csv:"DivWin"  db:"DivWin,omitempty"  bson:"DivWin"`
	Rank   int    `json:"rank"  csv:"Rank"  db:"Rank"  bson:"Rank"`
	G      int    `json:"g"  csv:"G"  db:"G"  bson:"G"`
	W      int    `json:"w"  csv:"W"  db:"W"  bson:"W"`
	L      int    `json:"l"  csv:"L"  db:"L"  bson:"L"`
	// contains filtered or unexported fields
}

TeamsHalf is a model that maps the CSV to a DB Table

func (*TeamsHalf) GenParseAndStoreCSV

func (m *TeamsHalf) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)

GenParseAndStoreCSV returns a function that will parse the source file,\n//create a slice with an object per line and store the data in the db

func (*TeamsHalf) GetFileName

func (m *TeamsHalf) GetFileName() string

GetFileName returns the name of the source file the model was created from

func (*TeamsHalf) GetFilePath

func (m *TeamsHalf) GetFilePath() string

GetFilePath returns the path of the source file

func (*TeamsHalf) GetTableName

func (m *TeamsHalf) GetTableName() string

GetTableName returns the name of the table that the data will be stored in

func (*TeamsHalf) SetInputDirectory

func (m *TeamsHalf) SetInputDirectory(inputDir string)

SetInputDirectory sets the input directory's path so it can be used to create the full path to the file

Jump to

Keyboard shortcuts

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