Skip to content

Commit 49484fc

Browse files
committed
Document the rest of the MongoStorage methods.
1 parent dc01706 commit 49484fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: storage.go

+3
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ func (storage *MongoStorage) accounts() *mgo.Collection {
3333
return storage.Database.C("accounts")
3434
}
3535

36+
// CreateAccount persists an Account model into Mongo as it's currently populated.
3637
func (storage *MongoStorage) CreateAccount(account *Account) error {
3738
return storage.accounts().Insert(account)
3839
}
3940

41+
// FindAccount queries for an existing account with a specified name. If no such account exists,
42+
// nil is returned.
4043
func (storage *MongoStorage) FindAccount(name string) (*Account, error) {
4144
var account Account
4245
err := storage.accounts().FindId(name).One(&account)

0 commit comments

Comments
 (0)