server

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo interface {
	RoundRepo
}

type RoundRepo

type RoundRepo interface {
	CreateEventRoundStart(ctx context.Context, roundID uuid.UUID, req api.RoundRequest) error
	GetRound(ctx context.Context, roundID uuid.UUID) (*api.Round, error)
	SetScore(ctx context.Context, roundID uuid.UUID, scoreData api.PlayerScoreEvent) error
	GetLatestRoundID(ctx context.Context) (string, error)
}

type Server

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

func New

func New(r Repo) *Server

func (*Server) CreateRound added in v0.1.2

func (s *Server) CreateRound(ctx echo.Context) error

func (*Server) GetLatestRoundID

func (s *Server) GetLatestRoundID(ctx echo.Context) error

func (*Server) GetRound added in v0.1.2

func (s *Server) GetRound(ctx echo.Context, roundID string) error

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

func (*Server) SendScore added in v0.1.2

func (s *Server) SendScore(ctx echo.Context, roundID string) error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) WithLogLevel

func (s *Server) WithLogLevel(level log.Lvl) *Server

Jump to

Keyboard shortcuts

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