neosync_benthos_mongodb

package
v0.4.69 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FindInputOperation      = "find"
	AggregateInputOperation = "aggregate"
)

mongodb input component allowed operations.

Variables

This section is empty.

Functions

func RegisterPooledMongoDbInput

func RegisterPooledMongoDbInput(env *service.Environment, clientProvider MongoPoolProvider) error

func RegisterPooledMongoDbOutput

func RegisterPooledMongoDbOutput(env *service.Environment, clientProvider MongoPoolProvider) error

Types

type JSONMarshalMode

type JSONMarshalMode string

JSONMarshalMode represents the way in which BSON should be marshaled to JSON.

const (
	// JSONMarshalModeCanonical Canonical BSON to JSON marshal mode.
	JSONMarshalModeCanonical JSONMarshalMode = "canonical"
	// JSONMarshalModeRelaxed Relaxed BSON to JSON marshal mode.
	JSONMarshalModeRelaxed JSONMarshalMode = "relaxed"
)

type MongoClient

type MongoClient interface {
	Database(name string, options ...*options.DatabaseOptions) *mongo.Database
	Ping(ctx context.Context, rp *readpref.ReadPref) error
	Disconnect(ctx context.Context) error
}

type MongoPoolProvider

type MongoPoolProvider interface {
	GetClient(url string) (MongoClient, error)
}

type Operation

type Operation string

Operation represents the operation that will be performed by MongoDB.

const (
	// OperationInsertOne Insert One operation.
	OperationInsertOne Operation = "insert-one"
	// OperationDeleteOne Delete One operation.
	OperationDeleteOne Operation = "delete-one"
	// OperationDeleteMany Delete many operation.
	OperationDeleteMany Operation = "delete-many"
	// OperationReplaceOne Replace one operation.
	OperationReplaceOne Operation = "replace-one"
	// OperationUpdateOne Update one operation.
	OperationUpdateOne Operation = "update-one"
	// OperationFindOne Find one operation.
	OperationFindOne Operation = "find-one"
	// OperationInvalid Invalid operation.
	OperationInvalid Operation = "invalid"
)

func NewOperation

func NewOperation(op string) Operation

NewOperation converts a string operation to a strongly-typed Operation.

Jump to

Keyboard shortcuts

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