Documentation ¶
Index ¶
- type MongoCollection
- func (s *MongoCollection) Delete(ctx context.Context, id string) (err error)
- func (s *MongoCollection) FindAll(ctx context.Context, page int64, limit int64) (p []app.Payment, err error)
- func (s *MongoCollection) FindByID(ctx context.Context, id string) (p app.Payment, err error)
- func (s *MongoCollection) Insert(ctx context.Context, payment app.Payment) (err error)
- func (s *MongoCollection) UpdateThirdParty(ctx context.Context, thirdParty app.ThirdParty, partyKey string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoCollection ¶
type MongoCollection struct {
// contains filtered or unexported fields
}
MongoCollection mongodb collection
func NewMongoCollection ¶
func NewMongoCollection(ctx context.Context, sourceUrl, database, collection string, timeout time.Duration) (col *MongoCollection, err error)
NewMongoCollection creates new MongoCollection instance
func (*MongoCollection) Delete ¶
func (s *MongoCollection) Delete(ctx context.Context, id string) (err error)
Delete deletes payment by id
func (*MongoCollection) FindAll ¶
func (s *MongoCollection) FindAll(ctx context.Context, page int64, limit int64) (p []app.Payment, err error)
FindAll returns payment by id
func (*MongoCollection) UpdateThirdParty ¶
func (s *MongoCollection) UpdateThirdParty(ctx context.Context, thirdParty app.ThirdParty, partyKey string) (err error)
UpdateThirdParty updates third party data
Click to show internal directories.
Click to hide internal directories.