Documentation ¶
Index ¶
- type ItemService
- func (s *ItemService) Create(ctx context.Context, request *item.CreateRequest) (*item.Item, error)
- func (s *ItemService) Delete(ctx context.Context, request *item.DeleteRequest) (*emptypb.Empty, error)
- func (s *ItemService) Fetch(ctx context.Context, request *item.FetchRequest) (*item.FetchResponse, error)
- func (s *ItemService) Get(ctx context.Context, request *item.GetRequest) (*item.Item, error)
- func (s *ItemService) Update(ctx context.Context, request *item.UpdateRequest) (*emptypb.Empty, error)
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemService ¶
type ItemService struct { item.UnimplementedItemServiceServer // contains filtered or unexported fields }
func New ¶
func New(repository Repository, storageClient storage.StorageServiceClient) *ItemService
func (*ItemService) Create ¶
func (s *ItemService) Create(ctx context.Context, request *item.CreateRequest) (*item.Item, error)
func (*ItemService) Fetch ¶
func (s *ItemService) Fetch(ctx context.Context, request *item.FetchRequest) (*item.FetchResponse, error)
type Repository ¶
type Repository interface { Get(ctx context.Context, id string) (*domain.Item, error) Fetch(ctx context.Context, criteria domain.ItemCriteria) (*domain.ItemPage, error) Create(ctx context.Context, item *domain.Item) (string, error) Update(ctx context.Context, item *domain.Item) error Delete(ctx context.Context, id string) error }
Click to show internal directories.
Click to hide internal directories.