Documentation ¶
Index ¶
- func ConvertStringValueToInt64(json map[string]interface{}, path string)
- func MarshalProtoBSON(m proto.Message, update updateJSON) ([]byte, error)
- func UnmarshalProtoBSON(data []byte, m proto.Message, update updateJSON) error
- type Config
- type OnClearFn
- type Operator
- type Store
- func (s *Store) AddCloseFunc(f func())
- func (s *Store) Clear(ctx context.Context) error
- func (s *Store) Client() *mongo.Client
- func (s *Store) Close(ctx context.Context) error
- func (s *Store) Collection(collection string) *mongo.Collection
- func (s *Store) DBName() string
- func (s *Store) DropCollection(ctx context.Context, collection string) error
- func (s *Store) DropDatabase(ctx context.Context) error
- func (s *Store) EnsureIndex(ctx context.Context, collection string, indexes ...mongo.IndexModel) error
- func (s *Store) SetOnClear(onClear OnClearFn)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStringValueToInt64 ¶ added in v2.21.0
func MarshalProtoBSON ¶ added in v2.21.0
Types ¶
type Config ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements an Store for MongoDB.
func NewStore ¶
func NewStore(ctx context.Context, cfg *Config, tls *tls.Config, tracerProvider trace.TracerProvider) (*Store, error)
NewStore creates a new Store.
func NewStoreWithCollection ¶
func NewStoreWithCollections ¶ added in v2.19.1
func (*Store) AddCloseFunc ¶ added in v2.16.0
func (s *Store) AddCloseFunc(f func())
func (*Store) Collection ¶
func (s *Store) Collection(collection string) *mongo.Collection
Get collection with given name
func (*Store) DropCollection ¶
Drops selected collection from database
func (*Store) DropDatabase ¶
Drops the whole database
func (*Store) EnsureIndex ¶
func (*Store) SetOnClear ¶
Set the function called on Clear
Click to show internal directories.
Click to hide internal directories.