Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleCreate ¶
type ConsoleCreate struct {
// contains filtered or unexported fields
}
ConsoleCreate is a use case for creating a console.
func NewConsoleCreate ¶
func NewConsoleCreate(repo ConsoleRepositoryCreator) *ConsoleCreate
NewConsoleCreate creates a new console create use case.
func (*ConsoleCreate) Create ¶
func (c *ConsoleCreate) Create(ctx context.Context, input model.ConsoleInsert) (*model.Console, error)
Create creates a console.
type ConsoleRepositoryCreator ¶
type ConsoleRepositoryCreator interface {
Save(ctx context.Context, console *entity.Console) error
}
ConsoleRepositoryCreator is an interface for creating a console in the repository.
type ConsoleRepositoryFinder ¶
type ConsoleRepositoryFinder interface {
FindByID(ctx context.Context, id string) (*entity.Console, error)
}
ConsoleRepositoryFinder is an interface for finding a console from the repository.
type ConsoleSearch ¶
type ConsoleSearch struct {
// contains filtered or unexported fields
}
ConsoleSearch is a use case for searching a console.
func NewConsoleSearch ¶
func NewConsoleSearch(repo ConsoleRepositoryFinder) *ConsoleSearch
NewConsoleSearch creates a new console search use case.
type GameSearch ¶
type GameSearch struct {
// contains filtered or unexported fields
}
GameSearch is a use case for searching a game.
func NewGameSearch ¶
func NewGameSearch(igdbClient IgdbGameFinder) *GameSearch
NewGameSearch creates a new game search use case.
type IgdbGameFinder ¶
type IgdbGameFinder interface { Games(ctx context.Context, name string) ([]igdb.Game, error) Genres(ctx context.Context, ids []int) ([]igdb.Genre, error) Platforms(ctx context.Context, ids []int) ([]igdb.Platform, error) }
IgdbGameFinder is an interface for finding games from IGDB.
type MockConsoleRepositoryCreator ¶
MockConsoleRepositoryCreator is an autogenerated mock type for the ConsoleRepositoryCreator type
func NewMockConsoleRepositoryCreator ¶
func NewMockConsoleRepositoryCreator(t interface { mock.TestingT Cleanup(func()) }) *MockConsoleRepositoryCreator
NewMockConsoleRepositoryCreator creates a new instance of MockConsoleRepositoryCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
type MockConsoleRepositoryFinder ¶
MockConsoleRepositoryFinder is an autogenerated mock type for the ConsoleRepositoryFinder type
func NewMockConsoleRepositoryFinder ¶
func NewMockConsoleRepositoryFinder(t interface { mock.TestingT Cleanup(func()) }) *MockConsoleRepositoryFinder
NewMockConsoleRepositoryFinder creates a new instance of MockConsoleRepositoryFinder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.