db

package
v0.0.0-...-59e8772 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 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 MongoDB

type MongoDB struct {
	// contains filtered or unexported fields
}

func (*MongoDB) AddTask

func (db *MongoDB) AddTask(task tasks.Task) error

func (*MongoDB) Connect

func (db *MongoDB) Connect() error

func (*MongoDB) DeleteTask

func (db *MongoDB) DeleteTask(id string) error

func (*MongoDB) GetTask

func (db *MongoDB) GetTask(taskID string) (tasks.Task, bool)

func (*MongoDB) GetTasks

func (db *MongoDB) GetTasks(ownerID string) ([]tasks.Task, error)

func (*MongoDB) UpdateTask

func (db *MongoDB) UpdateTask(task tasks.Task) error

type TaskDB

type TaskDB struct {
	ID          string    `bson:"id"`
	OwnerID     string    `bson:"owner_id"`
	Title       string    `bson:"title"`
	Description string    `bson:"description"`
	Status      string    `bson:"status"`
	DeletedAt   time.Time `bson:"deleted_at"`
	DeletedBy   string    `bson:"deleted_by"`
}

Jump to

Keyboard shortcuts

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