storage

package
v0.0.0-...-c433275 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetID

func GetID(id string) (primitive.ObjectID, bool)

func GetUserId

func GetUserId(user *models.User) (primitive.ObjectID, bool)

Types

type Mongo

type Mongo struct {
	DBName  string
	Context *models.Context
	Client  *mongo.Client
}

func (*Mongo) AssociateSocial

func (s *Mongo) AssociateSocial(social *models.Social) (*models.User, error)

func (*Mongo) Collection

func (s *Mongo) Collection() *mongo.Collection

func (*Mongo) FindOne

func (s *Mongo) FindOne(filter interface{}) (*models.User, error)

func (*Mongo) GetUser

func (s *Mongo) GetUser(userID string) (*models.User, error)

Jump to

Keyboard shortcuts

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