db

package
v0.0.0-...-8473205 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const COLLECTION_LIST string = "list"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(connectionString string) (*Client, error)

func (*Client) AddTask

func (c *Client) AddTask(listID string, task todo.Task) error

func (*Client) GetList

func (c *Client) GetList(id string) (*todo.List, error)

func (*Client) GetNewID

func (c *Client) GetNewID() primitive.ObjectID

func (*Client) SaveList

func (c *Client) SaveList(list *todo.List) error

func (*Client) SetClient

func (c *Client) SetClient(mongoClient *mongo.Client)

func (*Client) SetDatabase

func (c *Client) SetDatabase(db *mongo.Database)

func (*Client) TaskDone

func (c *Client) TaskDone(listID string, taskID string, done bool) error

Jump to

Keyboard shortcuts

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