Documentation ¶
Index ¶
- Variables
- type Card
- type Service
- func (s Service) DeleteCard(ctx context.Context, uid, id string) error
- func (s Service) GetAllCards(ctx context.Context, uid string) ([]Card, error)
- func (s Service) GetCardByID(ctx context.Context, uid, id string) (Card, error)
- func (s Service) StoreCard(ctx context.Context, card Card) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalid = errors.New("passed card data is invalid") ErrNotFound = errors.New("requested card data not found") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService returns an instance of the Service with pre-defined data microservice.
func (Service) DeleteCard ¶
DeleteCard removes the stored data with the unique ID. The method removes the data of the specified user only.
func (Service) GetAllCards ¶
GetAllCards returns all the user's stored cards.
func (Service) GetCardByID ¶
GetCardByID returns the stored data by the unique ID. The method returns the data of the specified user only.
Click to show internal directories.
Click to hide internal directories.