db

package
v0.0.0-...-6bdbf58 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close the connexion to mongo

func Connect

func Connect(uri string)

Connect connects to mongodb

func Middleware

func Middleware(username, password string) echo.MiddlewareFunc

Middleware to add db in echo.context

Types

type Client

type Client interface {
	Sprints() models.SprintsRepo
	Close()
}

Client is the entrypoint of Docktor API

func Get

func Get(username, password string) (Client, error)

Get the connexion to docktor API

type DB

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

DB is the implementation structure to call mongo

func (*DB) Close

func (db *DB) Close()

Close the connexion to mongo

func (*DB) Sprints

func (db *DB) Sprints() models.SprintsRepo

Sprints is the entrypoint for sprints model

Jump to

Keyboard shortcuts

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