Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoUserPresentError = errors.New("no user present")
View Source
var UserExistsError = errors.New("user exists")
Functions ¶
This section is empty.
Types ¶
type ConfigurationType ¶
type LeaderboardServer ¶
func NewLeaderboardServer ¶
func NewLeaderboardServer(store LeaderboardStore, isDevelopment bool) *LeaderboardServer
type LeaderboardStore ¶
type LeaderboardStore interface { GetUserRankings() []User GetUserRankingsFiltered(country string) []User CreateUserProfile(user User) (User, error) GetUserProfile(userId string) (User, error) SubmitUserScore(score Score) (Score, error) CreateUserProfiles(submission Submission) error CreateScoreSubmissions(submission Submission) error }
type Submission ¶
type User ¶
type User struct { UserId string `json:"user_id,omitempty" bson:"_id"` DisplayName string `json:"display_name" bson:"display_name"` Points float64 `json:"points" bson:"points"` Rank int64 `json:"rank" bson:"rank"` Country string `json:"country" bson:"country"` LastScoreTimeStamp string `bson:"last_score_timestamp"` }
func (User) MarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.