mongodb

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "mongodb"
)

Variables

This section is empty.

Functions

func Factory

func Factory() plugins.Factory

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?

func (Auth) Equal

func (a Auth) Equal(other Auth) bool

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
}

func (Config) Equal

func (c Config) Equal(other Config) bool

type Data

type Data struct {
	Config Config

	*transform.Rego
	// contains filtered or unexported fields
}

Data plugin

func (*Data) Name

func (c *Data) Name() string

dataPlugin accessors

func (*Data) Path

func (c *Data) Path() storage.Path

func (*Data) Reconfigure

func (c *Data) Reconfigure(ctx context.Context, next any)

func (*Data) Start

func (c *Data) Start(ctx context.Context) error

func (*Data) Stop

func (c *Data) Stop(ctx context.Context)

Jump to

Keyboard shortcuts

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