dbclient

package
v0.0.0-...-bffedf8 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMongoClient

type IMongoClient interface {
	OpenMongoDB()
	QueryAccount(accountID string) (model.Account, error)
	Seed()
}

IMongoClient is an interface for Mongo

type MockMongoClient

type MockMongoClient struct {
	mock.Mock
}

MockMongoClient is a mock implementation of a datastore client for testing purposes.

func (*MockMongoClient) OpenMongoDB

func (m *MockMongoClient) OpenMongoDB()

func (*MockMongoClient) QueryAccount

func (m *MockMongoClient) QueryAccount(accountID string) (model.Account, error)

func (*MockMongoClient) Seed

func (m *MockMongoClient) Seed()

type MongoClient

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

MongoClient defines a mongo session

func (*MongoClient) OpenMongoDB

func (mc *MongoClient) OpenMongoDB()

OpenMongoDB provides a connection to a mongoDB instance

func (*MongoClient) QueryAccount

func (mc *MongoClient) QueryAccount(accountID string) (model.Account, error)

func (*MongoClient) Seed

func (mc *MongoClient) Seed()

Seed creates a bunch of fake accounts for fun

Jump to

Keyboard shortcuts

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