mongodb

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommonNameKeyQueryIndex = bson.D{
	{Key: store.CommonNameKey, Value: 1},
	{Key: store.OwnerKey, Value: 1},
}
View Source
var DeviceIDKeyQueryIndex = bson.D{
	{Key: store.DeviceIDKey, Value: 1},
	{Key: store.OwnerKey, Value: 1},
}
View Source
var ErrCannotRemoveSigningRecord = errors.New("cannot remove signing record")
View Source
var PublicKeyQueryIndex = bson.D{
	{Key: store.CommonNameKey, Value: 1},
}

Functions

This section is empty.

Types

type BulkWriteConfig

type BulkWriteConfig struct {
	Timeout       time.Duration `yaml:"timeout"`
	ThrottleTime  time.Duration `yaml:"throttleTime"`
	DocumentLimit uint16        `yaml:"documentLimit"`
}

func (*BulkWriteConfig) Validate

func (c *BulkWriteConfig) Validate() error

type Config

type Config struct {
	Mongo     pkgMongo.Config `yaml:",inline"`
	BulkWrite BulkWriteConfig `yaml:"bulkWrite"`
}

func (*Config) Validate

func (c *Config) Validate() error

type SigningRecordsIterator

type SigningRecordsIterator struct {
	// contains filtered or unexported fields
}

func (*SigningRecordsIterator) Err

func (i *SigningRecordsIterator) Err() error

func (*SigningRecordsIterator) Next

type Store

type Store struct {
	*pkgMongo.Store
	// contains filtered or unexported fields
}

func New added in v2.16.0

func New(ctx context.Context, cfg *Config, fileWatcher *fsnotify.Watcher, logger log.Logger, tracerProvider trace.TracerProvider) (*Store, error)

func (*Store) Close

func (s *Store) Close(ctx context.Context) error

func (*Store) CreateSigningRecord

func (s *Store) CreateSigningRecord(ctx context.Context, signingRecord *store.SigningRecord) error

func (*Store) DeleteNonDeviceExpiredRecords

func (s *Store) DeleteNonDeviceExpiredRecords(ctx context.Context, now time.Time) (int64, error)

func (*Store) DeleteSigningRecords

func (s *Store) DeleteSigningRecords(ctx context.Context, owner string, query *store.DeleteSigningRecordsQuery) (int64, error)

func (*Store) FlushBulkWriter

func (s *Store) FlushBulkWriter() error

func (*Store) LoadSigningRecords

func (s *Store) LoadSigningRecords(ctx context.Context, owner string, query *store.SigningRecordsQuery, h store.LoadSigningRecordsFunc) error

func (*Store) UpdateSigningRecord

func (s *Store) UpdateSigningRecord(_ context.Context, signingRecord *store.SigningRecord) error

Jump to

Keyboard shortcuts

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