persistence

package
v0.0.0-...-db1d18a Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmployeeRepo

func NewEmployeeRepo(db Database) repository.Employee

Types

type Database

type Database interface {
	Session() *mgo.Session
	Name() string
	Close()
}

func NewDatabase

func NewDatabase(name string) Database

type EmployeeRepoHandler

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

func (EmployeeRepoHandler) All

func (handler EmployeeRepoHandler) All() []entity.Employee

func (EmployeeRepoHandler) C

func (handler EmployeeRepoHandler) C() string

func (EmployeeRepoHandler) FindByFirstName

func (handler EmployeeRepoHandler) FindByFirstName(name string) entity.Employee

func (EmployeeRepoHandler) FindByID

func (handler EmployeeRepoHandler) FindByID(id string) entity.Employee

func (EmployeeRepoHandler) Save

func (handler EmployeeRepoHandler) Save(employee entity.Employee) entity.Employee

type MongoDB

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

func (MongoDB) Close

func (m MongoDB) Close()

func (MongoDB) Name

func (m MongoDB) Name() string

func (MongoDB) Session

func (m MongoDB) Session() *mgo.Session

Jump to

Keyboard shortcuts

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