Documentation ¶
Index ¶
- type MongoCrashTable
- type MongoTable
- func (m *MongoTable[CountLog]) Count(ctx context.Context, platform string) (int, error)
- func (m *MongoTable[T]) Find(ctx context.Context, values map[string]any) ([]T, error)
- func (m *MongoTable[T]) FullUpdate(ctx context.Context, ID string, data T) error
- func (m *MongoTable[T]) Get(ctx context.Context, ID string) (data T, err error)
- func (m *MongoTable[T]) Insert(ctx context.Context, data T) error
- func (m *MongoTable[T]) PartUpdate(ctx context.Context, ID string, update map[string]any) error
- func (m *MongoTable[T]) Remove(ctx context.Context, ID string) error
- func (m *MongoTable[CountLog]) RemoveOldLogs(ctx context.Context, date int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoCrashTable ¶
type MongoCrashTable struct { *MongoTable[backend.CrashReport] // contains filtered or unexported fields }
func NewMongoCrashTable ¶
func NewMongoCrashTable(crashCol *mongo.Collection, archiveCol *mongo.Collection) *MongoCrashTable
func (*MongoCrashTable) Archive ¶
func (m *MongoCrashTable) Archive(ctx context.Context, toArchive backend.ArchivedCrash) error
func (*MongoCrashTable) InsertCrash ¶
func (m *MongoCrashTable) InsertCrash(ctx context.Context, ind backend.IndividualCrash) error
func (*MongoCrashTable) IsArchived ¶
func (m *MongoCrashTable) IsArchived(ctx context.Context, ind backend.IndividualCrash) bool
type MongoTable ¶
func NewMongoTable ¶
func NewMongoTable[T backend.IDStruct](col *mongo.Collection) *MongoTable[T]
func (*MongoTable[T]) FullUpdate ¶
func (m *MongoTable[T]) FullUpdate(ctx context.Context, ID string, data T) error
func (*MongoTable[T]) Get ¶
func (m *MongoTable[T]) Get(ctx context.Context, ID string) (data T, err error)
func (*MongoTable[T]) PartUpdate ¶
func (*MongoTable[CountLog]) RemoveOldLogs ¶
func (m *MongoTable[CountLog]) RemoveOldLogs(ctx context.Context, date int) error
Click to show internal directories.
Click to hide internal directories.