mongo

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserStore

type UserStore struct {
	// contains filtered or unexported fields
}

UserStore represents a UserStore implementation backed by mongo.

func NewUserStore

func NewUserStore(url string) *UserStore

NewUserStore returns an unconnected UserStore that satisfies the UserStore interface. You must call Connect() on the returned store before using it.

func (*UserStore) Connect

func (m *UserStore) Connect() error

Connect establishes a session to the mongo cluster.

func (*UserStore) Get

func (m *UserStore) Get(id, provider string) (*user.User, error)

Get returns a user from the Mongo Store

func (*UserStore) Save

func (m *UserStore) Save(u *user.User) error

Save adds a user to the Mongo Store

func (*UserStore) Update

func (m *UserStore) Update(*user.User) error

Update updates a user in the Mongo Store

Jump to

Keyboard shortcuts

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