Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStore ¶
type MemoryStore struct { }
MemoryStore is a simple in memory datastore that implements Store
func (*MemoryStore) Search ¶
func (m *MemoryStore) Search(name string) []Kitten
Search returns a slice of Kitten which have a name matching the name in the parameters
type MongoStore ¶
type MongoStore struct {
// contains filtered or unexported fields
}
MongoStore is a MongoDB data store which implements the Store interface
func NewMongoStore ¶
func NewMongoStore(connection string) (*MongoStore, error)
NewMongoStore creates an instance of MongoStore with the given connection string
func (*MongoStore) DeleteAllKittens ¶
func (m *MongoStore) DeleteAllKittens()
DeleteAllKittens deletes all the kittens from the datastore
func (*MongoStore) InsertKittens ¶
func (m *MongoStore) InsertKittens(kittens []Kitten)
InsertKittens inserts a slice of kittens into the datastore
func (*MongoStore) Search ¶
func (m *MongoStore) Search(name string) []Kitten
Search returns Kittens from the MongoDB instance which have the name name
Click to show internal directories.
Click to hide internal directories.