usecase

package
v0.0.0-...-e82a045 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateIngredientInputData

type CreateIngredientInputData struct {
	Kind   string
	Amount float64
}

type CreateIngredientInputPort

type CreateIngredientInputPort interface {
	Handle(context.Context, *CreateIngredientInputData) (*CreateIngredientOutputData, error)
}

func NewCreateIngredientInputPort

func NewCreateIngredientInputPort(
	ingredientFactory domain.IngredientFactory,
	ingredientRepository domain.IngredientRepository,
) CreateIngredientInputPort

type CreateIngredientOutputData

type CreateIngredientOutputData struct {
	Ingredient *domain.Ingredient
}

type DeleteIngredientInputData

type DeleteIngredientInputData struct {
	ID string
}

type DeleteIngredientInputPort

type DeleteIngredientInputPort interface {
	Handle(context.Context, *DeleteIngredientInputData) (*DeleteIngredientOutputData, error)
}

func NewDeleteIngredientInputPort

func NewDeleteIngredientInputPort(
	ingredientRepository domain.IngredientRepository,
) DeleteIngredientInputPort

type DeleteIngredientOutputData

type DeleteIngredientOutputData struct{}

type ListIngredientsInputData

type ListIngredientsInputData struct{}

type ListIngredientsInputPort

type ListIngredientsInputPort interface {
	Handle(context.Context, *ListIngredientsInputData) (*ListIngredientsOutputData, error)
}

func NewListIngredientsInputPort

func NewListIngredientsInputPort(
	ingredientRepository domain.IngredientRepository,
) ListIngredientsInputPort

type ListIngredientsOutputData

type ListIngredientsOutputData struct {
	Ingredients []*domain.Ingredient
}

Jump to

Keyboard shortcuts

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