func (m Mongo) Add(s string) error {
	s = truncate(s)
	_, err := m.session.DB(m.db).C(m.collection).UpsertId(s, bson.M{"_id": s})
	return err
}
Add an entry to the password database
package mgopw
import (
	"gopkg.in/mgo.v2"
	"gopkg.in/mgo.v2/bson"
)
type Mongo struct {
	session    *mgo.Session
	db         string
	collection string
}
func New(session *mgo.Session, db, collection string) *Mongo {
	m := Mongo{
		session:    session,
		db:         db,
		collection: collection,
	}
	return &m
}