game

package
v0.0.0-...-10f3eee Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEntryInput

type AddEntryInput struct {
	GameID     string
	PlayerID   string
	Roll       int
	AssignedTo string
}

type AddEntryOutput

type AddEntryOutput struct {
	Entry *ronnied.GameEntry
}

type Config

type Config struct {
	Client redis.UniversalClient
}

type CreateInput

type CreateInput struct {
	Game *ronnied.Game
}

type CreateOutput

type CreateOutput struct {
	Game *ronnied.Game
}

type GetInput

type GetInput struct {
	ID string
}

type GetOutput

type GetOutput struct {
	Game *ronnied.Game
}

type GetTabInput

type GetTabInput struct {
	GameID   string
	PlayerID string
}

type GetTabOutput

type GetTabOutput struct {
	Count int
}

type Interface

type Interface interface {
	Create(ctx context.Context, input *CreateInput) (*CreateOutput, error)
	Get(ctx context.Context, input *GetInput) (*GetOutput, error)
	Join(ctx context.Context, input *JoinInput) (*JoinOutput, error)
	AddEntry(ctx context.Context, input *AddEntryInput) (*AddEntryOutput, error)
	GetTab(ctx context.Context, input *GetTabInput) (*GetTabOutput, error)
	PayDrink(ctx context.Context, input *PayDrinkInput) (*PayDrinkOutput, error)
}

type JoinInput

type JoinInput struct {
	GameID   string
	PlayerID string
}

type JoinOutput

type JoinOutput struct{}

type LeaveInput

type LeaveInput struct {
	GameID   string
	PlayerID string
}

type LeaveOutput

type LeaveOutput struct{}

type PayDrinkInput

type PayDrinkInput struct {
	GameID   string
	PlayerID string
}

type PayDrinkOutput

type PayDrinkOutput struct{}

type Redis

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

func NewRedis

func NewRedis(cfg *Config) (*Redis, error)

func (*Redis) AddEntry

func (r *Redis) AddEntry(ctx context.Context, input *AddEntryInput) (*AddEntryOutput, error)

func (*Redis) Create

func (r *Redis) Create(ctx context.Context, input *CreateInput) (*CreateOutput, error)

func (*Redis) Get

func (r *Redis) Get(ctx context.Context, input *GetInput) (*GetOutput, error)

func (*Redis) GetTab

func (r *Redis) GetTab(ctx context.Context, input *GetTabInput) (*GetTabOutput, error)

func (*Redis) Join

func (r *Redis) Join(ctx context.Context, input *JoinInput) (*JoinOutput, error)

func (*Redis) Leave

func (r *Redis) Leave(ctx context.Context, input *LeaveInput) (*LeaveOutput, error)

func (*Redis) PayDrink

func (r *Redis) PayDrink(ctx context.Context, input *PayDrinkInput) (*PayDrinkOutput, error)

Jump to

Keyboard shortcuts

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