Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSearchIndexNotFound = errors.New("search Index not found")
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Database ¶
type Database interface { RunCommand(ctx context.Context, runCommand interface{}) (interface{}, error) InsertOne(ctx context.Context, collection string, doc interface{}) (interface{}, error) InitiateReplicaSet(ctx context.Context, rsName string, hostname string, internalPort int, externalPort int) error SearchIndex User Collection(string) Collection }
type MongoDBClient ¶
type MongoDBClient interface { Connect(connectionString string, waitSeconds int64) error Disconnect() Database(db string) Database SearchIndex(id string) (*admin.ClusterSearchIndex, error) DeleteSearchIndex(id string) error }
func NewClient ¶
func NewClient() MongoDBClient
func NewClientWithContext ¶
func NewClientWithContext(context context.Context) MongoDBClient
type SearchIndex ¶
type SearchIndex interface { CreateSearchIndex(ctx context.Context, collection string, idx *admin.ClusterSearchIndex) (*admin.ClusterSearchIndex, error) SearchIndex(ctx context.Context, id string) (*admin.ClusterSearchIndex, error) SearchIndexes(ctx context.Context, coll string) ([]*admin.ClusterSearchIndex, error) SearchIndexByName(ctx context.Context, name string, collection string) (*admin.ClusterSearchIndex, error) }
type SearchIndexDefinition ¶
type SearchIndexDefinition struct { ID string `bson:"id,omitempty"` Name string `bson:"name,omitempty"` Collection string `bson:"collection,omitempty"` Database string `bson:"database,omitempty"` Analyzer *string `bson:"analyzer,omitempty"` Analyzers []admin.ApiAtlasFTSAnalyzers `bson:"analyzers,omitempty"` Synonyms []admin.SearchSynonymMappingDefinition `bson:"synonyms,omitempty"` Mappings *admin.ApiAtlasFTSMappings `bson:"mappings,omitempty"` Status *string `bson:"status,omitempty"` }
Click to show internal directories.
Click to hide internal directories.