Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Collection(string, ...*options.CollectionOptions) *mongo.Collection Connect() context.CancelFunc Database() *mongo.Database DefineIndexes(...IndexSet) }
Client defines the interface for a service's MongoDB connection.
type IndexSet ¶
type IndexSet struct { Collection string Indexes []mongo.IndexModel }
IndexSet specifies the indexes to create for the given collection.
func NewIndexSet ¶
func NewIndexSet(collection string, indexes ...mongo.IndexModel) IndexSet
NewIndexSet creates a new IndexSet.
Click to show internal directories.
Click to hide internal directories.