interactors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	LoginInteractor() LoginInteractor
	PokerInteractor() PokerInteractor
}

func NewFactory

func NewFactory(rFactory ports.RepositoriesFactory) Factory

type LoginInteractor

type LoginInteractor interface {
	Login(ctx context.Context, login *porker.Login) (*porker.Login, error)
	Logout(ctx context.Context, login *porker.Login) error
}

func NewLoginInteractor

func NewLoginInteractor(rFactory ports.RepositoriesFactory) LoginInteractor

type PokerInteractor

type PokerInteractor interface {
	Create(ctx context.Context, loginID string) (room.ID, error)
	CanEnter(ctx context.Context, roomID room.ID) (bool, error)
	Enter(ctx context.Context, roomID room.ID, loginID string) (ports.PokerListener, error)
	Leave(ctx context.Context, roomID room.ID, loginID string) error
	Voting(ctx context.Context, roomID room.ID, loginID string, point porker.Point) error
	VoteCounting(ctx context.Context, roomID room.ID, loginID string) error
	Reset(ctx context.Context, roomID room.ID) error
}

func NewPokerInteractor

func NewPokerInteractor(rFactory ports.RepositoriesFactory) PokerInteractor

Jump to

Keyboard shortcuts

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