db

package
v0.0.0-...-a1d2d7e Latest Latest
Warning

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

Go to latest
Published: May 18, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOne

func CreateOne(patient model.Patient)

CreateOne calls GetOne to check if there is already a patient with that id, if not, it creates the patient

func DeleteOne

func DeleteOne(id primitive.ObjectID)

DeleteOne deletes the patient with the related id

func GetAll

func GetAll() []model.Patient

GetAll retrieves all patients on the patient collection

func GetOne

func GetOne(id primitive.ObjectID) model.Patient

GetOne returns the patient from requested ID

func NewSession

func NewSession() *mongo.Client

NewSession gets a mongo connection and returns a client pointer

func UpdateOne

func UpdateOne(patient []model.Patient)

UpdateOne modifies the relate patient

Types

This section is empty.

Jump to

Keyboard shortcuts

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