store

package
v0.0.0-...-e510c16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) FindByID

func (s *MongoCollection) FindByID(ctx context.Context, id string) (p app.Payment, err error)

FindByID returns payment by id

func (*MongoCollection) Insert

func (s *MongoCollection) Insert(ctx context.Context, payment app.Payment) (err error)

Insert creates new payment record

func (*MongoCollection) UpdateThirdParty

func (s *MongoCollection) UpdateThirdParty(ctx context.Context, thirdParty app.ThirdParty, partyKey string) (err error)

UpdateThirdParty updates third party data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL