drs_db

package
v0.0.0-...-cb6fcfe Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DrsDataTable

type DrsDataTable struct {
	Title      string `json:"title"`
	Artist     string `json:"artist"`
	Mode       string `json:"mode"`
	Difficulty string `json:"difficulty"`
	Level      string `json:"level"`

	Score             int       `json:"score"`
	PlayCount         int       `json:"playcount" gorm:"column:playcount"`
	BestScoreDateTime time.Time `json:"bestscoretime" gorm:"column:bestscoredatetime"`

	P1Code     int `json:"p1code" gorm:"column:p1code"`
	P1Perfects int `json:"p1perfects" gorm:"column:p1perfects"`
	P1Greats   int `json:"p1greats" gorm:"column:p1greats"`
	P1Goods    int `json:"p1goods" gorm:"column:p1goods"`
	P1Bads     int `json:"p1bads" gorm:"column:p1bads"`

	P2Code     int `json:"p2code" gorm:"column:p2code"`
	P2Perfects int `json:"p2perfects" gorm:"column:p2perfects"`
	P2Greats   int `json:"p2greats" gorm:"column:p2greats"`
	P2Goods    int `json:"p2goods" gorm:"column:p2goods"`
	P2Bads     int `json:"p2bads" gorm:"column:p2bads"`

	SongId string `json:"id" gorm:"column:id"`
	Code   int    `json:"code"`
	Param  int    `json:"param"`
}

type DrsDbCommunication

type DrsDbCommunication interface {
	AddPlayerDetails(details drs_models.PlayerDetails) (errs []error)
	AddPlayerProfileSnapshot(snapshot drs_models.PlayerProfileSnapshot) (errs []error)
	AddSongs(songs []drs_models.Song) (errs []error)
	AddDifficulties(songs []drs_models.Difficulty) (errs []error)
	AddPlayerSongStats(stats []drs_models.PlayerSongStats) (errs []error)
	AddPlayerScores(scores []drs_models.PlayerScore) (errs []error)

	RetrievePlayerDetailsByPlayerCode(code int) (details drs_models.PlayerDetails, errs []error)
	RetrievePlayerDetailsByEaGateUser(eaUser string) (details drs_models.PlayerDetails, errs []error)
	RetrieveRecentPlayerProfileSnapshot(code int) (snapshot drs_models.PlayerProfileSnapshot, errs []error)
	//RetrievePlayerProfileSnapshots(code int, dateFrom time.Time, dateTo time.Time) (snapshots []drs_models.PlayerProfileSnapshot, errs []error)
	//RetrieveSongs() (songs []drs_models.Song, errs []error)
	//RetrieveDifficulties(songs []drs_models.Song) (difficulties []drs_models.Difficulty, errs []error)
	RetrieveSongStatisticsByPlayerCode(code int) (stats []drs_models.PlayerSongStats, errs []error)

	RetrieveDataForTable(code int) (json string, errs []error)
}

type DrsDbCommunicationPostgres

type DrsDbCommunicationPostgres struct {
	// contains filtered or unexported fields
}

func CreateDrsDbCommunicationPostgres

func CreateDrsDbCommunicationPostgres(db *gorm.DB) DrsDbCommunicationPostgres

func (DrsDbCommunicationPostgres) AddDifficulties

func (dbcomm DrsDbCommunicationPostgres) AddDifficulties(difficulties []drs_models.Difficulty) (errs []error)

func (DrsDbCommunicationPostgres) AddPlayerDetails

func (dbcomm DrsDbCommunicationPostgres) AddPlayerDetails(details drs_models.PlayerDetails) (errs []error)

func (DrsDbCommunicationPostgres) AddPlayerProfileSnapshot

func (dbcomm DrsDbCommunicationPostgres) AddPlayerProfileSnapshot(snapshot drs_models.PlayerProfileSnapshot) (errs []error)

func (DrsDbCommunicationPostgres) AddPlayerScores

func (dbcomm DrsDbCommunicationPostgres) AddPlayerScores(scores []drs_models.PlayerScore) (errs []error)

func (DrsDbCommunicationPostgres) AddPlayerSongStats

func (dbcomm DrsDbCommunicationPostgres) AddPlayerSongStats(stats []drs_models.PlayerSongStats) (errs []error)

func (DrsDbCommunicationPostgres) AddSongs

func (dbcomm DrsDbCommunicationPostgres) AddSongs(songs []drs_models.Song) (errs []error)

func (DrsDbCommunicationPostgres) RetrieveDataForTable

func (dbcomm DrsDbCommunicationPostgres) RetrieveDataForTable(code int) (resultJson string, errs []error)

func (DrsDbCommunicationPostgres) RetrievePlayerDetailsByEaGateUser

func (dbcomm DrsDbCommunicationPostgres) RetrievePlayerDetailsByEaGateUser(eaUser string) (details drs_models.PlayerDetails, errs []error)

func (DrsDbCommunicationPostgres) RetrievePlayerDetailsByPlayerCode

func (dbcomm DrsDbCommunicationPostgres) RetrievePlayerDetailsByPlayerCode(code int) (details drs_models.PlayerDetails, errs []error)

func (DrsDbCommunicationPostgres) RetrieveRecentPlayerProfileSnapshot

func (dbcomm DrsDbCommunicationPostgres) RetrieveRecentPlayerProfileSnapshot(code int) (snapshot drs_models.PlayerProfileSnapshot, errs []error)

func (DrsDbCommunicationPostgres) RetrieveSongStatisticsByPlayerCode

func (dbcomm DrsDbCommunicationPostgres) RetrieveSongStatisticsByPlayerCode(code int) (stats []drs_models.PlayerSongStats, errs []error)

Jump to

Keyboard shortcuts

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