ddr_db

package
Version: v0.0.0-...-374d589 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DdrDbCommunication

type DdrDbCommunication interface {
	AddSongs(songs []ddr_models.Song) (errs []error)
	RetrieveSongIds() (songIds []string, errs []error)
	RetrieveSongsById(songIds []string, ordering []string) (songs []ddr_models.Song, errs []error)
	RetrieveJacketForSongId(songId string) (jacket string, errs []error)
	RetrieveJacketsForSongIds(songIds []string) (jackets map[string]string, errs []error)

	AddDifficulties(difficulties []ddr_models.SongDifficulty) (errs []error)
	RetrieveDifficulties() (difficulties []ddr_models.SongDifficulty, errs []error)
	RetrieveValidDifficulties() (difficulties []ddr_models.SongDifficulty, errs []error)
	RetrieveDifficultiesById(songIds []string) (difficulties []ddr_models.SongDifficulty, errs []error)
	RetrieveValidDifficultiesById(songIds []string) (difficulties []ddr_models.SongDifficulty, errs []error)

	AddPlayerDetails(details ddr_models.PlayerDetails) (errs []error)
	RetrievePlayerDetailsByEaGateUser(eaGateUser string) (details ddr_models.PlayerDetails, errs []error)
	RetrievePlayerDetailsByPlayerCode(code int) (details ddr_models.PlayerDetails, errs []error)

	AddPlaycounts(playcountDetails []ddr_models.Playcount) (errs []error)
	RetrievePlaycountsByPlayerCode(code int) (playcounts []ddr_models.Playcount, errs []error)
	RetrieveLatestPlaycountByPlayerCode(code int) (playcount ddr_models.Playcount, errs []error)
	RetrievePlaycountsByPlayerCodeInDateRange(code int, startDate time.Time, endDate time.Time) (playcounts []ddr_models.Playcount, errs []error)

	AddSongStatistics(statistics []ddr_models.SongStatistics) (errs []error)
	RetrieveSongStatisticsByPlayerCode(code int, songIds []string) (statistics []ddr_models.SongStatistics, errs []error)

	AddScores(scores []ddr_models.Score) (errs []error)
	RetrieveScoresByPlayerCode(code int) (scores []ddr_models.Score, errs []error)
	RetrieveSongScores(code int, songId string, mode string, difficulty string, ordering []string) (scores []ddr_models.Score, errs []error)

	AddWorkoutData(workoutData []ddr_models.WorkoutData) (errs []error)
	RetrieveWorkoutDataByPlayerCode(code int) (workoutData []ddr_models.WorkoutData, errs []error)
	RetrieveWorkoutDataByPlayerCodeInDateRange(code int, startDate time.Time, endDate time.Time) (workoutData []ddr_models.WorkoutData, errs []error)

	RetrieveExtendedScoreStatisticsByPlayerCode(code int) (statisticsJson string, errs []error)
}

type DdrDbCommunicationPostgres

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

func CreateDdrDbCommunicationPostgres

func CreateDdrDbCommunicationPostgres(db *gorm.DB) DdrDbCommunicationPostgres

func (DdrDbCommunicationPostgres) AddDifficulties

func (dbcomm DdrDbCommunicationPostgres) AddDifficulties(difficulties []ddr_models.SongDifficulty) (errs []error)

func (DdrDbCommunicationPostgres) AddPlaycounts

func (dbcomm DdrDbCommunicationPostgres) AddPlaycounts(playcountDetails []ddr_models.Playcount) (errs []error)

func (DdrDbCommunicationPostgres) AddPlayerDetails

func (dbcomm DdrDbCommunicationPostgres) AddPlayerDetails(details ddr_models.PlayerDetails) (errs []error)

func (DdrDbCommunicationPostgres) AddScores

func (dbcomm DdrDbCommunicationPostgres) AddScores(scores []ddr_models.Score) (errs []error)

func (DdrDbCommunicationPostgres) AddSongStatistics

func (dbcomm DdrDbCommunicationPostgres) AddSongStatistics(statistics []ddr_models.SongStatistics) (errs []error)

func (DdrDbCommunicationPostgres) AddSongs

func (dbcomm DdrDbCommunicationPostgres) AddSongs(songs []ddr_models.Song) (errs []error)

func (DdrDbCommunicationPostgres) AddWorkoutData

func (dbcomm DdrDbCommunicationPostgres) AddWorkoutData(workoutData []ddr_models.WorkoutData) (errs []error)

func (DdrDbCommunicationPostgres) RetrieveDifficulties

func (dbcomm DdrDbCommunicationPostgres) RetrieveDifficulties() (difficulties []ddr_models.SongDifficulty, errs []error)

func (DdrDbCommunicationPostgres) RetrieveDifficultiesById

func (dbcomm DdrDbCommunicationPostgres) RetrieveDifficultiesById(songIds []string) (difficulties []ddr_models.SongDifficulty, errs []error)

func (DdrDbCommunicationPostgres) RetrieveExtendedScoreStatisticsByPlayerCode

func (dbcomm DdrDbCommunicationPostgres) RetrieveExtendedScoreStatisticsByPlayerCode(code int) (statisticsJson string, errs []error)

func (DdrDbCommunicationPostgres) RetrieveJacketForSongId

func (dbcomm DdrDbCommunicationPostgres) RetrieveJacketForSongId(songId string) (jacket string, errs []error)

func (DdrDbCommunicationPostgres) RetrieveJacketsForSongIds

func (dbcomm DdrDbCommunicationPostgres) RetrieveJacketsForSongIds(songIds []string) (jackets map[string]string, errs []error)

func (DdrDbCommunicationPostgres) RetrieveLatestPlaycountByPlayerCode

func (dbcomm DdrDbCommunicationPostgres) RetrieveLatestPlaycountByPlayerCode(code int) (playcount ddr_models.Playcount, errs []error)

func (DdrDbCommunicationPostgres) RetrievePlaycountsByPlayerCode

func (dbcomm DdrDbCommunicationPostgres) RetrievePlaycountsByPlayerCode(code int) (playcounts []ddr_models.Playcount, errs []error)

func (DdrDbCommunicationPostgres) RetrievePlaycountsByPlayerCodeInDateRange

func (dbcomm DdrDbCommunicationPostgres) RetrievePlaycountsByPlayerCodeInDateRange(code int, startDate time.Time, endDate time.Time) (playcounts []ddr_models.Playcount, errs []error)

func (DdrDbCommunicationPostgres) RetrievePlayerDetailsByEaGateUser

func (dbcomm DdrDbCommunicationPostgres) RetrievePlayerDetailsByEaGateUser(eaGateUser string) (details ddr_models.PlayerDetails, errs []error)

func (DdrDbCommunicationPostgres) RetrievePlayerDetailsByPlayerCode

func (dbcomm DdrDbCommunicationPostgres) RetrievePlayerDetailsByPlayerCode(code int) (details ddr_models.PlayerDetails, errs []error)

func (DdrDbCommunicationPostgres) RetrieveScoresByPlayerCode

func (dbcomm DdrDbCommunicationPostgres) RetrieveScoresByPlayerCode(code int) (scores []ddr_models.Score, errs []error)

func (DdrDbCommunicationPostgres) RetrieveSongIds

func (dbcomm DdrDbCommunicationPostgres) RetrieveSongIds() (songIds []string, errs []error)

func (DdrDbCommunicationPostgres) RetrieveSongScores

func (dbcomm DdrDbCommunicationPostgres) RetrieveSongScores(code int, songId string, mode string, difficulty string, ordering []string) (scores []ddr_models.Score, errs []error)

func (DdrDbCommunicationPostgres) RetrieveSongStatisticsByPlayerCode

func (dbcomm DdrDbCommunicationPostgres) RetrieveSongStatisticsByPlayerCode(code int, songIds []string) (statistics []ddr_models.SongStatistics, errs []error)

func (DdrDbCommunicationPostgres) RetrieveSongsById

func (dbcomm DdrDbCommunicationPostgres) RetrieveSongsById(songIds []string, ordering []string) (songs []ddr_models.Song, errs []error)

func (DdrDbCommunicationPostgres) RetrieveValidDifficulties

func (dbcomm DdrDbCommunicationPostgres) RetrieveValidDifficulties() (difficulties []ddr_models.SongDifficulty, errs []error)

func (DdrDbCommunicationPostgres) RetrieveValidDifficultiesById

func (dbcomm DdrDbCommunicationPostgres) RetrieveValidDifficultiesById(songIds []string) (difficulties []ddr_models.SongDifficulty, errs []error)

func (DdrDbCommunicationPostgres) RetrieveWorkoutDataByPlayerCode

func (dbcomm DdrDbCommunicationPostgres) RetrieveWorkoutDataByPlayerCode(code int) (workoutData []ddr_models.WorkoutData, errs []error)

func (DdrDbCommunicationPostgres) RetrieveWorkoutDataByPlayerCodeInDateRange

func (dbcomm DdrDbCommunicationPostgres) RetrieveWorkoutDataByPlayerCodeInDateRange(code int, startDate time.Time, endDate time.Time) (workoutData []ddr_models.WorkoutData, errs []error)

type DdrStatisticsTable

type DdrStatisticsTable struct {
	Level      int    `json:"level"`
	Title      string `json:"title"`
	Artist     string `json:"artist"`
	Mode       string `json:"mode"`
	Difficulty string `json:"difficulty"`
	Lamp       string `json:"lamp"`
	Rank       string `json:"rank"`
	Score      int    `json:"score"`
	PlayCount  int    `gorm:"column:playcount" json:"playcount"`
	ClearCount int    `gorm:"column:clearcount" json:"clearcount"`
	MaxCombo   int    `gorm:"column:maxcombo" json:"maxcombo"`
	Id         string `gorm:"column:id" json:"id"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL