commands

package
v0.0.0-...-f6f9ed2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCloseSession

func HandleCloseSession(w http.ResponseWriter, r *http.Request)

func HandleCreateGameSession

func HandleCreateGameSession(w http.ResponseWriter, r *http.Request)

func HandleCreateSessionInvitation

func HandleCreateSessionInvitation(w http.ResponseWriter, r *http.Request)

func HandleJoinSession

func HandleJoinSession(w http.ResponseWriter, r *http.Request)

Types

type CloseSessionCommand

type CloseSessionCommand struct {
	UserID    uuid.UUID
	SessionID string
}

func (CloseSessionCommand) Validate

func (c CloseSessionCommand) Validate() error

type CloseSessionCommandHandler

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

func NewCloseSessionCommandHandler

func NewCloseSessionCommandHandler(db *sql.DB) *CloseSessionCommandHandler

func (*CloseSessionCommandHandler) Handle

type CreateSessionCommand

type CreateSessionCommand struct {
	OwnerID uuid.UUID
	Name    string
}

func (CreateSessionCommand) Validate

func (c CreateSessionCommand) Validate() error

type CreateSessionCommandHandler

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

func NewCreateSessionCommandHandler

func NewCreateSessionCommandHandler(db *sql.DB) *CreateSessionCommandHandler

func (*CreateSessionCommandHandler) Handle

type CreateSessionInvitationCommand

type CreateSessionInvitationCommand struct {
	SessionID string
	InviterID uuid.UUID
	InviteeID uuid.UUID
}

func (CreateSessionInvitationCommand) Validate

type CreateSessionInvitationCommandHandler

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

func NewCreateSessionInvitationCommandHandler

func NewCreateSessionInvitationCommandHandler(db *sql.DB) *CreateSessionInvitationCommandHandler

func (*CreateSessionInvitationCommandHandler) Handle

type CreateSessionResponse

type CreateSessionResponse struct {
	SessionID string
}

type JoinSessionCommand

type JoinSessionCommand struct {
	PlayerID  uuid.UUID
	SessionID string
}

func (JoinSessionCommand) Validate

func (c JoinSessionCommand) Validate() error

type JoinSessionCommandHandler

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

func NewJoinSessionCommandHandler

func NewJoinSessionCommandHandler(db *sql.DB) *JoinSessionCommandHandler

func (*JoinSessionCommandHandler) Handle

type JoinSessionResponse

type JoinSessionResponse struct {
	SessionURL string
}

Jump to

Keyboard shortcuts

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