Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertTodo ¶
type InsertTodo struct { UserID *primitive.ObjectID `bson:"_user"` Title string `bson:"title"` Done bool `bson:"done"` CreatedAt time.Time `bson:"createdAt"` }
InsertTodo is an item to be inserted into the database.
type Todo ¶
type Todo struct { ID *primitive.ObjectID `bson:"_id"` Title string `bson:"title"` Done bool `bson:"done"` CreatedAt time.Time `bson:"createdAt"` }
Todo is an item of the list.
func FetchDone ¶
func FetchDone(ctx context.Context, c *mongo.Collection, uID *primitive.ObjectID) (todos []Todo, err error)
FetchDone fetches the done todos.
func FetchNotDone ¶
func FetchNotDone(ctx context.Context, c *mongo.Collection, uID *primitive.ObjectID) (todos []Todo, err error)
FetchNotDone fetches the not done todos.
Click to show internal directories.
Click to hide internal directories.