mongo

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*mongo.Config
	PasswordSalt string
}

func NewConfig added in v1.20.0

func NewConfig() *Config

func (*Config) Load added in v1.20.0

func (c *Config) Load(configReporter config.Reporter) error

func (*Config) Validate

func (c *Config) Validate() error

type Store

type Store struct {
	*mongo.Store
	// contains filtered or unexported fields
}

func New

func New(cfg *Config, lgr log.Logger) (*Store, error)

func (*Store) NewUsersSession added in v1.20.0

func (s *Store) NewUsersSession() store.UsersSession

type UsersSession added in v1.20.0

type UsersSession struct {
	*mongo.Session
	// contains filtered or unexported fields
}

func (*UsersSession) DeleteUser added in v1.20.0

func (u *UsersSession) DeleteUser(ctx context.Context, user *user.User) error

func (*UsersSession) DestroyUserByID added in v1.20.0

func (u *UsersSession) DestroyUserByID(ctx context.Context, userID string) error

func (*UsersSession) GetUserByID added in v1.20.0

func (u *UsersSession) GetUserByID(ctx context.Context, userID string) (*user.User, error)

func (*UsersSession) HashPassword added in v1.20.0

func (u *UsersSession) HashPassword(userID string, password string) string

func (*UsersSession) PasswordMatches added in v1.20.0

func (u *UsersSession) PasswordMatches(user *user.User, password string) bool

Jump to

Keyboard shortcuts

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