mongo

package
v0.0.0-...-11c8b56 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2018 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package mongo implements repo.Repo for a mongodb database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(connURL string) repo.Repo

New will attempt to connect to the MongoDB instance at connURL and return the repo.Repo that is connected to it.

Types

type Repo

type Repo struct {
	Conn *mgo.Session
	// contains filtered or unexported fields
}

Repo contains all model specific repos.

func (Repo) Clean

func (r Repo) Clean() error

Clean will remove all data from the database

func (Repo) Fields

func (r Repo) Fields() repo.FieldSchemeRepo

Fields returns the fieldSchemesRepo implementation for mongodb

func (Repo) Init

func (r Repo) Init() error

Init will setup the indexes on the database

func (Repo) Notifications

func (r Repo) Notifications() repo.NotificationRepo

Notifications returns the notificationRepo implementation for mongodb

func (Repo) Projects

func (r Repo) Projects() repo.ProjectRepo

Projects returns the projectRepo implementation for mongodb

func (Repo) Test

func (r Repo) Test() error

Test will test connection to the database

func (Repo) Tickets

func (r Repo) Tickets() repo.TicketRepo

Tickets returns the ticketRepo implementation for mongodb

func (Repo) Users

func (r Repo) Users() repo.UserRepo

Users returns the userRepo implementation for mongodb

func (Repo) Workflows

func (r Repo) Workflows() repo.WorkflowRepo

Workflows returns the workflowRepo implementation for mongodb

Jump to

Keyboard shortcuts

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