handlers

package
v1.0.0-rc.11 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetStateHandler

func NewGetStateHandler(app AppGetState) http.HandlerFunc

func NewSetStateHandler

func NewSetStateHandler(app AppSetState) http.HandlerFunc

func OpenAPIHandler

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

func WelcomeHandler

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

Types

type AppGetState

type AppGetState interface {
	GetState(ctx context.Context) map[int]int
}

type AppSetState

type AppSetState interface {
	SetState(ctx context.Context, state map[int]int) (map[int]int, error)
	SetOne(ctx context.Context, gameId, botsNumber int) (map[int]int, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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