mongo

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: BSD-3-Clause Imports: 9 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 `anonymous:"true"`
	PasswordSalt  string `json:"passwordSalt"`
}

func (*Config) Clone

func (c *Config) Clone() *Config

func (*Config) Validate

func (c *Config) Validate() error

type Session

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

func (*Session) DeleteUser

func (s *Session) DeleteUser(user *user.User) error

func (*Session) DestroyUserByID

func (s *Session) DestroyUserByID(userID string) error

func (*Session) GetUserByID

func (s *Session) GetUserByID(userID string) (*user.User, error)

func (*Session) HashPassword

func (s *Session) HashPassword(userID string, password string) string

func (*Session) PasswordMatches

func (s *Session) PasswordMatches(user *user.User, password string) bool

type Store

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

func New

func New(logger log.Logger, config *Config) (*Store, error)

func (*Store) NewSession

func (s *Store) NewSession(logger log.Logger) (store.Session, error)

Jump to

Keyboard shortcuts

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