dbclient

package
v0.0.0-...-ee24a41 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 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()
	QueryTopic(topicID string) (model.Topic, 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) QueryTopic

func (m *MockMongoClient) QueryTopic(topicID string) (model.Topic, 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) QueryTopic

func (mc *MongoClient) QueryTopic(topicID string) (model.Topic, error)

func (*MongoClient) Seed

func (mc *MongoClient) Seed()

Seed creates a bunch of fake topics for fun

Jump to

Keyboard shortcuts

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