ronnied_actions

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 AddRollInput

type AddRollInput struct {
	GameID   string
	PlayerID string
	Roll     int
}

type AddRollOutput

type AddRollOutput struct {
	AssignedTo string
	Success    bool
}

type AddRollsInput

type AddRollsInput struct {
	GameID    string
	PlayerID  string
	RollCount int
}

type AddRollsOutput

type AddRollsOutput struct {
	Results []*RollResult
	Success bool
}

type AddSessionRollInput

type AddSessionRollInput struct {
	SessionRollID string
	PlayerID      string
}

type AddSessionRollOutput

type AddSessionRollOutput struct {
	SessionEntry *ronnied.SessionEntry
}

type AssignDrinkInput

type AssignDrinkInput struct {
	GameID        string
	PlayerID      string
	SessionRollID string
	AssignedTo    string
}

type AssignDrinkOutput

type AssignDrinkOutput struct{}

type CreateGameInput

type CreateGameInput struct {
	Game *ronnied.Game
}

type CreateGameOutput

type CreateGameOutput struct {
	Game *ronnied.Game
}

type CreateSessionInput

type CreateSessionInput struct {
	GameID string
}

type CreateSessionOutput

type CreateSessionOutput struct {
	Session *ronnied.Session
}

type CreateSessionRollInput

type CreateSessionRollInput struct {
	SessionID    string
	Type         ronnied.RollType
	Participants []string
}

type CreateSessionRollOutput

type CreateSessionRollOutput struct {
	SessionRoll *ronnied.SessionRoll
}

type GetSessionInput

type GetSessionInput struct {
	SessionID string
}

type GetSessionOutput

type GetSessionOutput struct {
	Session *ronnied.Session
}

type GetSessionRollInput

type GetSessionRollInput struct {
	SessionRollID string
}

type GetSessionRollOutput

type GetSessionRollOutput struct {
	SessionRoll *ronnied.SessionRoll
}

type GetTabInput

type GetTabInput struct {
	GameID   string
	PlayerID string
}

type GetTabOutput

type GetTabOutput struct {
	Count int
}

type Interface

type Interface interface {
	JoinGame(ctx context.Context, input *JoinGameInput) (*JoinGameOutput, error)
	AddRoll(ctx context.Context, input *AddRollInput) (*AddRollOutput, error)
	AddRolls(ctx context.Context, input *AddRollsInput) (*AddRollsOutput, error)
	GetTab(ctx context.Context, input *GetTabInput) (*GetTabOutput, error)
	ListTabs(ctx context.Context, input *ListTabsInput) (*ListTabsOutput, error)
	PayDrink(ctx context.Context, input *PayDrinkInput) (*PayDrinkOutput, error)
	CreateSession(ctx context.Context, input *CreateSessionInput) (*CreateSessionOutput, error)
	UpdateSession(ctx context.Context, input *UpdateSessionInput) (*UpdateSessionOutput, error)
	JoinSession(ctx context.Context, input *JoinSessionInput) (*JoinSessionOutput, error)
	AddSessionRoll(ctx context.Context, input *AddSessionRollInput) (*AddSessionRollOutput, error)
	CreateSessionRoll(ctx context.Context, input *CreateSessionRollInput) (*CreateSessionRollOutput, error)
	UpdateSessionRoll(ctx context.Context, input *UpdateSessionRollInput) (*UpdateSessionRollOutput, error)
	GetSessionRoll(ctx context.Context, input *GetSessionRollInput) (*GetSessionRollOutput, error)
	GetSession(ctx context.Context, input *GetSessionInput) (*GetSessionOutput, error)
	AssignDrink(ctx context.Context, input *AssignDrinkInput) (*AssignDrinkOutput, error)
}

type JoinGameInput

type JoinGameInput struct {
	GameID   string
	GameName string
	PlayerID string
}

type JoinGameOutput

type JoinGameOutput struct {
}

type JoinSessionInput

type JoinSessionInput struct {
	SessionID     string
	SessionRollID string
	PlayerID      string
	PlayerName    string
}

type JoinSessionOutput

type JoinSessionOutput struct {
	Session     *ronnied.Session
	SessionRoll *ronnied.SessionRoll
}

type ListTabsInput

type ListTabsInput struct {
	GameID string
}

type ListTabsOutput

type ListTabsOutput struct {
	Tabs []*ronnied.Tab
}

type Manager

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

func NewManager

func NewManager(cfg *ManagerConfig) (*Manager, error)

func (*Manager) AddRoll

func (m *Manager) AddRoll(ctx context.Context, input *AddRollInput) (*AddRollOutput, error)

func (*Manager) AddRolls

func (m *Manager) AddRolls(ctx context.Context, input *AddRollsInput) (*AddRollsOutput, error)

func (*Manager) AddSessionRoll

func (m *Manager) AddSessionRoll(ctx context.Context, input *AddSessionRollInput) (*AddSessionRollOutput, error)

func (*Manager) AssignDrink

func (m *Manager) AssignDrink(ctx context.Context, input *AssignDrinkInput) (*AssignDrinkOutput, error)

func (*Manager) CreateGame

func (m *Manager) CreateGame(ctx context.Context, input *CreateGameInput) (*CreateGameOutput, error)

func (*Manager) CreateSession

func (m *Manager) CreateSession(ctx context.Context, input *CreateSessionInput) (*CreateSessionOutput, error)

func (*Manager) CreateSessionRoll

func (m *Manager) CreateSessionRoll(ctx context.Context, input *CreateSessionRollInput) (*CreateSessionRollOutput, error)

func (*Manager) GetSession

func (m *Manager) GetSession(ctx context.Context, input *GetSessionInput) (*GetSessionOutput, error)

func (*Manager) GetSessionRoll

func (m *Manager) GetSessionRoll(ctx context.Context, input *GetSessionRollInput) (*GetSessionRollOutput, error)

func (*Manager) GetTab

func (m *Manager) GetTab(ctx context.Context, input *GetTabInput) (*GetTabOutput, error)

func (*Manager) JoinGame

func (m *Manager) JoinGame(ctx context.Context, input *JoinGameInput) (*JoinGameOutput, error)

func (*Manager) JoinSession

func (m *Manager) JoinSession(ctx context.Context, input *JoinSessionInput) (*JoinSessionOutput, error)

func (*Manager) ListTabs

func (m *Manager) ListTabs(ctx context.Context, input *ListTabsInput) (*ListTabsOutput, error)

func (*Manager) PayDrink

func (m *Manager) PayDrink(ctx context.Context, input *PayDrinkInput) (*PayDrinkOutput, error)

func (*Manager) UpdateSession

func (m *Manager) UpdateSession(ctx context.Context, input *UpdateSessionInput) (*UpdateSessionOutput, error)

func (*Manager) UpdateSessionRoll

func (m *Manager) UpdateSessionRoll(ctx context.Context, input *UpdateSessionRollInput) (*UpdateSessionRollOutput, error)

type ManagerConfig

type ManagerConfig struct {
	GameRepo    game.Interface
	SessionRepo session.Interface
}

type PayDrinkInput

type PayDrinkInput struct {
	GameID   string
	PlayerID string
}

type PayDrinkOutput

type PayDrinkOutput struct {
	TabRemaining int
}

type RollResult

type RollResult struct {
	PlayerID   string
	AssignedTo string
	Roll       int
}

type UpdateSessionInput

type UpdateSessionInput struct {
	Session *ronnied.Session
}

type UpdateSessionOutput

type UpdateSessionOutput struct {
	Session *ronnied.Session
}

type UpdateSessionRollInput

type UpdateSessionRollInput struct {
	SessionRoll *ronnied.SessionRoll
}

type UpdateSessionRollOutput

type UpdateSessionRollOutput struct {
	SessionRoll *ronnied.SessionRoll
}

Jump to

Keyboard shortcuts

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