Documentation
¶
Index ¶
- type RedisMutexes
- type RedisRepository
- type RedisStore
- func (store *RedisStore[T]) Load(ctx context.Context, id any) (entity T, found bool, err error)
- func (store *RedisStore[T]) RemoveAll(ctx context.Context, ids []any) error
- func (store *RedisStore[T]) Save(ctx context.Context, id any, entity T) error
- func (store *RedisStore[T]) SaveAll(ctx context.Context, entitiesToInsert map[any]any, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisMutexes ¶
type RedisMutexes struct {
// contains filtered or unexported fields
}
func NewRedisMutexes ¶
func NewRedisMutexes(client *redis.Client, key string) *RedisMutexes
func (*RedisMutexes) NewAndLock ¶
type RedisRepository ¶
type RedisRepository[T any] struct { arp.Repository[T] // contains filtered or unexported fields }
func NewRedisRepository ¶
func NewRedisRepository[T any](client *redis.Client, key string, newZeroEntity arp.NewZeroEntity[T]) *RedisRepository[T]
func NewRedisRepositoryWithMutexesimpl ¶
func NewRedisRepositoryWithMutexesimpl[T any](client *redis.Client, key string, newZeroEntity arp.NewZeroEntity[T], mutexesimpl arp.Mutexes) *RedisRepository[T]
func (*RedisRepository[T]) Count ¶
func (repo *RedisRepository[T]) Count(ctx context.Context) (uint64, error)
func (*RedisRepository[T]) QueryAllIds ¶
func (repo *RedisRepository[T]) QueryAllIds(ctx context.Context) (ids []any, err error)
type RedisStore ¶
type RedisStore[T any] struct { // contains filtered or unexported fields }
func NewRedisStore ¶
func NewRedisStore[T any](client *redis.Client, key string, newEmptyEntity arp.NewZeroEntity[T]) *RedisStore[T]
func (*RedisStore[T]) RemoveAll ¶
func (store *RedisStore[T]) RemoveAll(ctx context.Context, ids []any) error
Click to show internal directories.
Click to hide internal directories.