todo

package
v0.0.0-...-82ef3d0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

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