Documentation
¶
Index ¶
Constants ¶
View Source
const (
Name = "mongodb"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// AuthMechanism defines the mechanism to use for authentication. Supported values include "SCRAM-SHA-256", "SCRAM-SHA-1",
// "MONGODB-CR", "PLAIN", "GSSAPI", "MONGODB-X509", and "MONGODB-AWS". For more details,
// https://www.mongodb.com/docs/manual/core/authentication-mechanisms/.
AuthMechanism string `json:"auth_mechanism"`
// AuthMechanismProperties can be used to specify additional configuration options for certain mechanisms.
// See https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanismProperties
AuthMechanismProperties map[string]string `json:"auth_mechanism_properties"`
// AuthSource sets the name of the database to use for authentication.
// https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource
AuthSource string `json:"auth_source"`
// Username is the username for authentication.
Username string `json:"username"`
// Password is the password for authentication.
Password string `json:"password"`
// PasswordSet is for GSSAPI, this must be true if a password is specified, even if the password is the empty string, and
// false if no password is specified, indicating that the password should be taken from the context of the running
// process. For other mechanisms, this field is ignored.
PasswordSet bool `json:"password_set"`
}
TODO: Consider exporting this from mongodb builtin?
type Config ¶
type Config struct {
URI string `json:"uri,omitempty"`
Auth Auth `json:"auth,omitempty"`
Database string `json:"database"`
Collection string `json:"collection"`
FindOptions map[string]interface{} `json:"find_options"`
Filter map[string]interface{} `json:"filter"`
Canonical bool `json:"canonical"`
Interval string `json:"polling_interval,omitempty"` // default 30s
Path string `json:"path"`
RegoTransformRule string `json:"rego_transform"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.