mongodb

package
v0.0.0-...-f4b0e85 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 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 SampleMongo

type SampleMongo struct {
	Collection *mongo.Collection
}

SampleMongo is a an implementation for the SampleModel interface to interact with Samples in MongoDB

func (*SampleMongo) Delete

func (s *SampleMongo) Delete(id string) (int64, error)

Delete (SampleMongo) deletes a Sample based on its ID To-do

func (*SampleMongo) Get

func (s *SampleMongo) Get(id string) (*models.Sample, error)

Get (SampleMongo) gets a Sample based on the ID

func (*SampleMongo) Insert

func (s *SampleMongo) Insert(content string) (string, error)

Insert (SampleMongo) inserts a new Sample into the database returns the id of new entry and an error

func (*SampleMongo) Update

func (s *SampleMongo) Update(id string, content string) (int64, error)

Update (SampleMongo) updates a Sample based on its ID To-do

Jump to

Keyboard shortcuts

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