Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection interface { DeleteOne(c string, d interface{}) (*mongo.DeleteResult, error) Distinct(c string, q string, f interface{}) ([]interface{}, error) FindAll(c string, q bson.M, o ...*options.FindOptions) ([]bson.M, error) FindOne(c string, q bson.M, r interface{}) error InsertOne(c string, d interface{}) (*mongo.InsertOneResult, error) Ping() error UpdateOne(c string, f, d interface{}) (*mongo.UpdateResult, error) }
type DB ¶
type DB interface { Create(d wallet.Queryable) (*mongo.InsertOneResult, error) Delete(collectionName, id string) (*mongo.DeleteResult, error) Get(id string, d wallet.Queryable) error GetAll(q wallet.Queryable) ([]wallet.Queryable, error) GetBySlug(slug string, d wallet.Queryable) error Update(id string, d wallet.Queryable) (*mongo.UpdateResult, error) GetPortfolioData(p *wallet.Portfolio, year int) error GetAllOperations() (interface{}, error) GetAllPurchases() (interface{}, error) GetAllSales() (interface{}, error) Ping() error }
func NewMongoSession ¶
Click to show internal directories.
Click to hide internal directories.