Documentation
¶
Index ¶
- Variables
- func DefaultMongoClientOptions(connString, appName string, maxPoolSize uint64, ...) *options.ClientOptions
- func NewMongoClient(ctx context.Context, retryOpts helper.RetryOptions, opts options.ClientOptions) (contract.MongoClient, error)
- func NewTool(c Client, opts contract.ToolOptions[Client]) *defaultTool
- type Blackbox
- type Client
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToConnectToMongo = errors.New("failed to connect to mongo") ErrFailedToPingMongo = errors.New("failed to ping mongo") ErrFailedToCreateCollection = errors.New("failed to create collection") ErrInvalidType = errors.New("data must be a struct or a pointer to a struct") ErrInsertFailed = errors.New("failed to insert data") ErrNotIdentifiable = errors.New("entity does not implement contract.Identifiable") ErrFindFailed = errors.New("failed to find document") ErrDecodeFailed = errors.New("failed to decode document") ErrNoDocument = errors.New("no document found") ErrDeleteFailed = errors.New("failed to delete document") ErrReplaceFailed = errors.New("failed to replace document") ErrSessionInit = errors.New("failed to initialize session") ErrTransactionInit = errors.New("failed to start transaction") ErrValueConversion = errors.New("failed to convert value") ErrUnsupportedType = errors.New("unsupported type in query map") ErrWatchFailed = errors.New("failed to watch collection or database") ErrCloseFailed = errors.New("failed to close change stream") ErrProcessingChangeStream = errors.New("error processing change stream") )
Functions ¶
func NewMongoClient ¶
func NewMongoClient(ctx context.Context, retryOpts helper.RetryOptions, opts options.ClientOptions) (contract.MongoClient, error)
Types ¶
type Client ¶
type Client interface {
Blackbox
contract.DBOperator
contract.MongoOperator
}
Click to show internal directories.
Click to hide internal directories.