Documentation ¶
Index ¶
- func NewQuoteRepository(collection *mongo.Collection) quote.Repository
- type MongoStorage
- type QuoteRepository
- func (r *QuoteRepository) Create(ctx context.Context, q *quote.Quote) error
- func (r *QuoteRepository) Delete(ctx context.Context, id string) error
- func (r *QuoteRepository) GetAll(ctx context.Context) ([]quote.Quote, error)
- func (r *QuoteRepository) GetById(ctx context.Context, id string) (*quote.Quote, error)
- func (r *QuoteRepository) Update(ctx context.Context, q *quote.Quote) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuoteRepository ¶
func NewQuoteRepository(collection *mongo.Collection) quote.Repository
Types ¶
type MongoStorage ¶
func NewMongoStorage ¶
func NewMongoStorage() (*MongoStorage, error)
type QuoteRepository ¶
type QuoteRepository struct {
// contains filtered or unexported fields
}
func (*QuoteRepository) Delete ¶
func (r *QuoteRepository) Delete(ctx context.Context, id string) error
Click to show internal directories.
Click to hide internal directories.