Documentation ¶
Index ¶
- func NewClient(ctx context.Context, dbCfg *config.MongoDB) (*mongo.Client, error)
- func NewLogRepository(logs *mongo.Collection) database.Controller[*types.Log]
- func NewTokenRepository(tokens *mongo.Collection) database.Controller[*types.Token]
- type Iterator
- type LogRepository
- func (l *LogRepository) Count(ctx context.Context) (int64, error)
- func (l *LogRepository) Delete(ctx context.Context, id string) error
- func (l *LogRepository) Find(ctx context.Context, query find.Query[*types.Log], ...) (database.Iterator[*types.Log], error)
- func (l *LogRepository) Get(ctx context.Context, id string) (*types.Log, error)
- func (l *LogRepository) Insert(ctx context.Context, log *types.Log) error
- func (l *LogRepository) Update(ctx context.Context, id string, updates updates.Updates[*types.Log]) error
- type TokenRepository
- func (t *TokenRepository) Count(ctx context.Context) (int64, error)
- func (t *TokenRepository) Delete(ctx context.Context, id string) error
- func (t *TokenRepository) Find(ctx context.Context, query find.Query[*types.Token], ...) (database.Iterator[*types.Token], error)
- func (t *TokenRepository) Get(ctx context.Context, id string) (*types.Token, error)
- func (t *TokenRepository) Insert(ctx context.Context, msg *types.Token) error
- func (t *TokenRepository) Update(ctx context.Context, id string, updates updates.Updates[*types.Token]) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogRepository ¶
func NewLogRepository(logs *mongo.Collection) database.Controller[*types.Log]
func NewTokenRepository ¶
func NewTokenRepository(tokens *mongo.Collection) database.Controller[*types.Token]
Types ¶
type LogRepository ¶
type LogRepository struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.