Documentation ¶
Index ¶
Constants ¶
View Source
const (
ERROR_UNIQUE_CARD_NUMBER_ID = "the card number id must be unique"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuyerTotalOrders ¶
type Repository ¶
type Repository interface { GetAll(ctx context.Context) ([]Buyer, error) Create(ctx context.Context, buyer Buyer) (Buyer, error) Update(ctx context.Context, buyer Buyer) (Buyer, error) Delete(ctx context.Context, id int) error GetById(ctx context.Context, id int) (Buyer, error) GetBuyerOrdersById(ctx context.Context, id int) (BuyerTotalOrders, error) GetBuyerTotalOrders(ctx context.Context) ([]BuyerTotalOrders, error) ValidateCardNumberId(ctx context.Context, id int, cardNumber string) (bool, error) }
type Service ¶
type Service interface { GetAll(ctx context.Context) ([]Buyer, error) Create(ctx context.Context, buyer Buyer) (Buyer, error) Update(ctx context.Context, buyer Buyer) (Buyer, error) Delete(ctx context.Context, id int) error GetById(ctx context.Context, id int) (Buyer, error) GetBuyerOrdersById(ctx context.Context, id int) (BuyerTotalOrders, error) GetBuyerTotalOrders(ctx context.Context) ([]BuyerTotalOrders, error) }
Click to show internal directories.
Click to hide internal directories.