mongo

package
v0.0.0-...-e4e151b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongoClient

func NewMongoClient(mongoURI string, connectionTimeout time.Duration) (*mongo.Client, error)

NewMongoClient creates a new instance of client

Types

type NoteRepository

type NoteRepository interface {
	CreateNote(newNote *entity.Note) error
	GetNoteByID(noteID string) (*entity.Note, error)
	GetCompletedNotes() ([]*entity.Note, error)
	UpdateNoteByID(updatedNote *entity.Note) error
	DeleteNoteByID(noteID string) error
}

NoteRepository defines repository actions for resource NOTE.

func NewNoteRepository

func NewNoteRepository(client *mongo.Client, database, collection string, timeout time.Duration) NoteRepository

NewNoteRepository creates new instance of noteRepository

Jump to

Keyboard shortcuts

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