level

package
v0.0.0-...-e2f2e58 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

type CreateResponse struct {
	UUID       string
	ServerTime time.Time
}

func (CreateResponse) Validate

func (r CreateResponse) Validate() error

type Event

type Event string
const (
	EventDeath              Event = "death"
	EventComplete           Event = "complete"
	EventGrapplingHookUsage Event = "grappling_hook_usage"
)

func (Event) Validate

func (e Event) 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 InsertEventResult struct {
	UUID       string
	ServerTime time.Time
}

type InsertQuery

type InsertQuery struct {
	SessionUUID string
	Level       int
	ClientTime  time.Time
	Metadata    map[string]interface{}
}

type InsertResult

type InsertResult struct {
	UUID       string
	ServerTime time.Time
}

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

type LogCompleteResponse struct {
	UUID       string
	ServerTime time.Time
}

func (LogCompleteResponse) Validate

func (r LogCompleteResponse) Validate() error

type LogDeathRequest

type LogDeathRequest struct {
	UUID       string
	ClientTime time.Time
}

func (LogDeathRequest) Validate

func (r LogDeathRequest) Validate() error

type LogDeathResponse

type LogDeathResponse struct {
	UUID       string
	ServerTime time.Time
}

func (LogDeathResponse) Validate

func (r LogDeathResponse) Validate() error

type LogGrapplingHookUsageRequest

type LogGrapplingHookUsageRequest struct {
	UUID       string
	ClientTime time.Time
}

func (LogGrapplingHookUsageRequest) Validate

func (r LogGrapplingHookUsageRequest) Validate() error

type LogGrapplingHookUsageResponse

type LogGrapplingHookUsageResponse struct {
	UUID       string
	ServerTime time.Time
}

func (LogGrapplingHookUsageResponse) Validate

func (r LogGrapplingHookUsageResponse) Validate() error

type Store

type Store interface {
	Insert(context.Context, InsertQuery) (InsertResult, error)
	InsertEvent(context.Context, InsertEventQuery) (InsertEventResult, error)
}

Jump to

Keyboard shortcuts

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