repository

package
v0.0.0-...-90cdabe Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoRepository

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

func (*MongoRepository) CloseConnection

func (dbs *MongoRepository) CloseConnection() error

func (*MongoRepository) ConnectDB

func (dbs *MongoRepository) ConnectDB(username string, password string, url string, port int) *mongo.Client

func (*MongoRepository) GetDb

func (dbs *MongoRepository) GetDb() (*mongo.Client, error)

func (*MongoRepository) Init

func (dbs *MongoRepository) Init(username string, password string, url string, port int) *MongoRepository

func (*MongoRepository) ListDatabases

func (dbs *MongoRepository) ListDatabases() []string

func (*MongoRepository) PingDb

func (dbs *MongoRepository) PingDb() error

type UserRepository

type UserRepository interface {
	SaveUser(user models.User) (models.User, error)
	GetUserByEmail(email string) (models.User, error)
	GetUser(user models.User) (models.User, error)
	// contains filtered or unexported methods
}

type UserRepositoryImpl

type UserRepositoryImpl struct {
	MongoRepository *MongoRepository
}

func (UserRepositoryImpl) GetUser

func (u UserRepositoryImpl) GetUser(user models.User) (models.User, error)

func (UserRepositoryImpl) GetUserByEmail

func (u UserRepositoryImpl) GetUserByEmail(email string) (models.User, error)

func (UserRepositoryImpl) SaveUser

func (u UserRepositoryImpl) SaveUser(user models.User) (models.User, error)

Jump to

Keyboard shortcuts

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