Documentation ¶
Overview ¶
Package mongo interfaces with MongoDb for us.
Package mongo interfaces with MongoDb for us.
Package mongo interfaces with MongoDb for us.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session holds a MongoDb session.
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService holds a MongoDb collection.
func NewUserService ¶
func NewUserService(session *mgo.Session) *UserService
NewUserService initialises and returns a new UserService.
func (*UserService) CreateUser ¶
func (p *UserService) CreateUser(u *root.User) error
CreateUser will create a user on the designated service.
func (*UserService) GetUserByUsername ¶
func (p *UserService) GetUserByUsername(username string) (root.User, error)
GetUserByUsername looks up a user by name and returns it.
func (*UserService) Login ¶
func (p *UserService) Login(c root.Credentials) (root.User, error)
Login will log a user into a given service.
Click to show internal directories.
Click to hide internal directories.