Documentation
¶
Index ¶
- type Achievement
- type CreateRequest
- type CreateResponse
- type Event
- type InsertEventQuery
- type InsertEventResult
- type InsertQuery
- type InsertResult
- type LogCompleteRequest
- type LogCompleteResponse
- type LogDeathRequest
- type LogDeathResponse
- type LogGrapplingHookUsageRequest
- type LogGrapplingHookUsageResponse
- type Service
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Achievement ¶
type Achievement string
const ( AchievementThreeStars Achievement = "three_stars" AchievementTwoStars Achievement = "two_stars" AchievementOneStar Achievement = "one_star" )
type CreateRequest ¶
type CreateRequest struct {
SessionUUID string
Level int
ClientTime time.Time
Metadata map[string]interface{}
}
func (CreateRequest) Validate ¶
func (r CreateRequest) Validate() error
type CreateResponse ¶
func (CreateResponse) Validate ¶
func (r CreateResponse) Validate() error
type InsertEventQuery ¶
type InsertEventQuery struct {
UUID string
Event Event
ClientTime time.Time
Metadata map[string]interface{}
}
func (InsertEventQuery) Validate ¶
func (q InsertEventQuery) Validate() error
type InsertEventResult ¶
type InsertQuery ¶
type InsertResult ¶
type LogCompleteRequest ¶
type LogCompleteRequest struct {
UUID string
ClientTime time.Time
Achievement Achievement
CompletionTime time.Duration
}
func (LogCompleteRequest) Validate ¶
func (r LogCompleteRequest) Validate() error
type LogCompleteResponse ¶
func (LogCompleteResponse) Validate ¶
func (r LogCompleteResponse) Validate() error
type LogDeathRequest ¶
func (LogDeathRequest) Validate ¶
func (r LogDeathRequest) Validate() error
type LogDeathResponse ¶
func (LogDeathResponse) Validate ¶
func (r LogDeathResponse) Validate() error
type LogGrapplingHookUsageRequest ¶
func (LogGrapplingHookUsageRequest) Validate ¶
func (r LogGrapplingHookUsageRequest) Validate() error
type LogGrapplingHookUsageResponse ¶
func (LogGrapplingHookUsageResponse) Validate ¶
func (r LogGrapplingHookUsageResponse) Validate() error
type Service ¶
type Service interface {
Create(context.Context, CreateRequest) (CreateResponse, error)
LogDeath(context.Context, LogDeathRequest) (LogDeathResponse, error)
LogComplete(context.Context, LogCompleteRequest) (LogCompleteResponse, error)
LogGrapplingHookUsage(context.Context, LogGrapplingHookUsageRequest) (LogGrapplingHookUsageResponse, error)
}
type Store ¶
type Store interface {
Insert(context.Context, InsertQuery) (InsertResult, error)
InsertEvent(context.Context, InsertEventQuery) (InsertEventResult, error)
}
Click to show internal directories.
Click to hide internal directories.