Documentation ¶
Index ¶
- func StartSession() (mongo.Session, error)
- type Board
- type Card
- type List
- type MongoCollection
- func (coll *MongoCollection) BulkUpdateByIDs(idsToUpdate map[string]interface{}, ctx context.Context) error
- func (coll *MongoCollection) BulkUpdateByIDsWithTimeout(idsToUpdate map[string]interface{}, timeout time.Duration, ctx context.Context) error
- func (coll *MongoCollection) FindAll(filter interface{}, ctx context.Context) (*mongo.Cursor, error)
- func (coll *MongoCollection) FindAllWithTimeout(filter interface{}, timeout time.Duration, ctx context.Context) (*mongo.Cursor, error)
- func (coll *MongoCollection) FindByID(ID string, ctx context.Context) (*mongo.SingleResult, error)
- func (coll *MongoCollection) FindByIDWithTimeout(ID string, timeout time.Duration, ctx context.Context) (*mongo.SingleResult, error)
- func (coll *MongoCollection) InsertOne(document interface{}, ctx context.Context) (string, error)
- func (coll *MongoCollection) InsertOneWithTimeout(document interface{}, timeout time.Duration, ctx context.Context) (string, error)
- func (coll *MongoCollection) UpdateByID(ID string, update interface{}, ctx context.Context) error
- func (coll *MongoCollection) UpdateByIDWithTimeout(ID string, update interface{}, timeout time.Duration, ctx context.Context) error
- type MongoConnection
- type MongoDatabase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartSession ¶
Types ¶
type Card ¶
type Card struct { ID primitive.ObjectID `json:"_id" bson:"_id"` Name string `json:"name" bson:"name"` DueDate *string `json:"dueDate" bson:"dueDate"` ParentBoardID string `json:"parentBoardId" bson:"parentBoardId"` ParentListID string `json:"parentListId" bson:"parentListId"` Archived bool `json:"archived,omitempty" bson:"archived,omitempty"` }
type MongoCollection ¶
type MongoCollection struct {
// contains filtered or unexported fields
}
func (*MongoCollection) BulkUpdateByIDs ¶
func (coll *MongoCollection) BulkUpdateByIDs(idsToUpdate map[string]interface{}, ctx context.Context) error
func (*MongoCollection) BulkUpdateByIDsWithTimeout ¶
func (*MongoCollection) FindAllWithTimeout ¶
func (*MongoCollection) FindByID ¶
func (coll *MongoCollection) FindByID(ID string, ctx context.Context) (*mongo.SingleResult, error)
func (*MongoCollection) FindByIDWithTimeout ¶
func (coll *MongoCollection) FindByIDWithTimeout(ID string, timeout time.Duration, ctx context.Context) (*mongo.SingleResult, error)
func (*MongoCollection) InsertOne ¶
func (coll *MongoCollection) InsertOne(document interface{}, ctx context.Context) (string, error)
func (*MongoCollection) InsertOneWithTimeout ¶
func (*MongoCollection) UpdateByID ¶
func (coll *MongoCollection) UpdateByID(ID string, update interface{}, ctx context.Context) error
func (*MongoCollection) UpdateByIDWithTimeout ¶
type MongoConnection ¶
type MongoConnection struct {
// contains filtered or unexported fields
}
var Client *MongoConnection
func InitConnectionFromConfig ¶
func InitConnectionFromConfig(c *config.Config) (*MongoConnection, error)
func (*MongoConnection) InitDatabase ¶
func (conn *MongoConnection) InitDatabase(database string) *MongoDatabase
type MongoDatabase ¶
type MongoDatabase struct {
// contains filtered or unexported fields
}
func (*MongoDatabase) InitCollection ¶
func (database *MongoDatabase) InitCollection(collection string) *MongoCollection
Click to show internal directories.
Click to hide internal directories.