Documentation ¶
Index ¶
- type AllstarFull
- func (m *AllstarFull) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *AllstarFull) GetFileName() string
- func (m *AllstarFull) GetFilePath() string
- func (m *AllstarFull) GetTableName() string
- func (m *AllstarFull) SetInputDirectory(inputDir string)
- type Appearances
- func (m *Appearances) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *Appearances) GetFileName() string
- func (m *Appearances) GetFilePath() string
- func (m *Appearances) GetTableName() string
- func (m *Appearances) SetInputDirectory(inputDir string)
- type AwardsManagers
- func (m *AwardsManagers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *AwardsManagers) GetFileName() string
- func (m *AwardsManagers) GetFilePath() string
- func (m *AwardsManagers) GetTableName() string
- func (m *AwardsManagers) SetInputDirectory(inputDir string)
- type AwardsPlayers
- func (m *AwardsPlayers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *AwardsPlayers) GetFileName() string
- func (m *AwardsPlayers) GetFilePath() string
- func (m *AwardsPlayers) GetTableName() string
- func (m *AwardsPlayers) SetInputDirectory(inputDir string)
- type AwardsShareManagers
- func (m *AwardsShareManagers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *AwardsShareManagers) GetFileName() string
- func (m *AwardsShareManagers) GetFilePath() string
- func (m *AwardsShareManagers) GetTableName() string
- func (m *AwardsShareManagers) SetInputDirectory(inputDir string)
- type AwardsSharePlayers
- func (m *AwardsSharePlayers) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *AwardsSharePlayers) GetFileName() string
- func (m *AwardsSharePlayers) GetFilePath() string
- func (m *AwardsSharePlayers) GetTableName() string
- func (m *AwardsSharePlayers) SetInputDirectory(inputDir string)
- type Batting
- type BattingPost
- func (m *BattingPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *BattingPost) GetFileName() string
- func (m *BattingPost) GetFilePath() string
- func (m *BattingPost) GetTableName() string
- func (m *BattingPost) SetInputDirectory(inputDir string)
- type CollegePlaying
- func (m *CollegePlaying) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *CollegePlaying) GetFileName() string
- func (m *CollegePlaying) GetFilePath() string
- func (m *CollegePlaying) GetTableName() string
- func (m *CollegePlaying) SetInputDirectory(inputDir string)
- type Fielding
- type FieldingOF
- func (m *FieldingOF) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *FieldingOF) GetFileName() string
- func (m *FieldingOF) GetFilePath() string
- func (m *FieldingOF) GetTableName() string
- func (m *FieldingOF) SetInputDirectory(inputDir string)
- type FieldingOFsplit
- func (m *FieldingOFsplit) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *FieldingOFsplit) GetFileName() string
- func (m *FieldingOFsplit) GetFilePath() string
- func (m *FieldingOFsplit) GetTableName() string
- func (m *FieldingOFsplit) SetInputDirectory(inputDir string)
- type FieldingPost
- func (m *FieldingPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *FieldingPost) GetFileName() string
- func (m *FieldingPost) GetFilePath() string
- func (m *FieldingPost) GetTableName() string
- func (m *FieldingPost) SetInputDirectory(inputDir string)
- type HallOfFame
- func (m *HallOfFame) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *HallOfFame) GetFileName() string
- func (m *HallOfFame) GetFilePath() string
- func (m *HallOfFame) GetTableName() string
- func (m *HallOfFame) SetInputDirectory(inputDir string)
- type HomeGames
- func (m *HomeGames) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *HomeGames) GetFileName() string
- func (m *HomeGames) GetFilePath() string
- func (m *HomeGames) GetTableName() string
- func (m *HomeGames) SetInputDirectory(inputDir string)
- type Managers
- type ManagersHalf
- func (m *ManagersHalf) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *ManagersHalf) GetFileName() string
- func (m *ManagersHalf) GetFilePath() string
- func (m *ManagersHalf) GetTableName() string
- func (m *ManagersHalf) SetInputDirectory(inputDir string)
- type Parks
- type ParseAndStoreCSVFunc
- type People
- type Pitching
- type PitchingPost
- func (m *PitchingPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *PitchingPost) GetFileName() string
- func (m *PitchingPost) GetFilePath() string
- func (m *PitchingPost) GetTableName() string
- func (m *PitchingPost) SetInputDirectory(inputDir string)
- type Salaries
- type Schools
- type SeriesPost
- func (m *SeriesPost) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *SeriesPost) GetFileName() string
- func (m *SeriesPost) GetFilePath() string
- func (m *SeriesPost) GetTableName() string
- func (m *SeriesPost) SetInputDirectory(inputDir string)
- type TableObject
- type Teams
- type TeamsFranchises
- func (m *TeamsFranchises) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *TeamsFranchises) GetFileName() string
- func (m *TeamsFranchises) GetFilePath() string
- func (m *TeamsFranchises) GetTableName() string
- func (m *TeamsFranchises) SetInputDirectory(inputDir string)
- type TeamsHalf
- func (m *TeamsHalf) GenParseAndStoreCSV(f *os.File, repo db.Repository, pfunc csv.ParserFunc) (ParseAndStoreCSVFunc, error)
- func (m *TeamsHalf) GetFileName() string
- func (m *TeamsHalf) GetFilePath() string
- func (m *TeamsHalf) GetTableName() string
- func (m *TeamsHalf) SetInputDirectory(inputDir string)
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"` 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 { // 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 { // 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 ¶
GetFileName returns the name of the source file the model was created from
func (*Batting) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Batting) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Batting) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*Fielding) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Fielding) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Fielding) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*HomeGames) GetFilePath ¶
GetFilePath returns the path of the source file
func (*HomeGames) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*HomeGames) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*Managers) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Managers) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Managers) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*Parks) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Parks) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Parks) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*People) GetFilePath ¶
GetFilePath returns the path of the source file
func (*People) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*People) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*Pitching) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Pitching) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Pitching) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*Salaries) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Salaries) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Salaries) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*Schools) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Schools) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Schools) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*Teams) GetFilePath ¶
GetFilePath returns the path of the source file
func (*Teams) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*Teams) SetInputDirectory ¶
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 ¶
GetFileName returns the name of the source file the model was created from
func (*TeamsHalf) GetFilePath ¶
GetFilePath returns the path of the source file
func (*TeamsHalf) GetTableName ¶
GetTableName returns the name of the table that the data will be stored in
func (*TeamsHalf) SetInputDirectory ¶
SetInputDirectory sets the input directory's path so it can be used to create the full path to the file
Source Files ¶
- allstarfull.go
- appearances.go
- awardsmanagers.go
- awardsplayers.go
- awardssharemanagers.go
- awardsshareplayers.go
- batting.go
- battingpost.go
- collegeplaying.go
- databank.go
- fielding.go
- fieldingof.go
- fieldingofsplit.go
- fieldingpost.go
- halloffame.go
- homegames.go
- managers.go
- managershalf.go
- parks.go
- people.go
- pitching.go
- pitchingpost.go
- salaries.go
- schools.go
- seriespost.go
- teams.go
- teamsfranchises.go
- teamshalf.go