Documentation ¶
Index ¶
- Constants
- type MongoStore
- func (mongo *MongoStore) Close()
- func (mongo *MongoStore) CreateUser(u *models.User) (string, error)
- func (mongo *MongoStore) DeleteUserById(id string) error
- func (mongo *MongoStore) GetUserById(id string) (*models.User, error)
- func (mongo *MongoStore) GetUsers() ([]*models.User, error)
- func (mongo *MongoStore) UpdateUser(u *models.User) error
- type Store
Constants ¶
View Source
const ( DB = "nat-busters" USERS_COL = "users" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoStore ¶
type MongoStore struct {
// contains filtered or unexported fields
}
func NewMongoStore ¶
func NewMongoStore(url string) *MongoStore
func (*MongoStore) Close ¶
func (mongo *MongoStore) Close()
func (*MongoStore) CreateUser ¶
func (mongo *MongoStore) CreateUser(u *models.User) (string, error)
func (*MongoStore) DeleteUserById ¶
func (mongo *MongoStore) DeleteUserById(id string) error
func (*MongoStore) GetUserById ¶
func (mongo *MongoStore) GetUserById(id string) (*models.User, error)
func (*MongoStore) UpdateUser ¶
func (mongo *MongoStore) UpdateUser(u *models.User) error
Click to show internal directories.
Click to hide internal directories.