redisRepository

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisEntity

type RedisEntity[ID RedisEntityId] interface {
	gpa.Entity[ID]
	GetKey() string
}

type RedisEntityId

type RedisEntityId interface {
	gpa.Id
	ToString() string // redis key 가 string 임.
}

type RedisRepository

type RedisRepository[E RedisEntity[ID], ID RedisEntityId] interface {
	gpa.CrudRepository[E, ID]
}

func NewRedisRepository

func NewRedisRepository[E RedisEntity[ID], ID RedisEntityId](ctx context.Context, pipe redis.Pipeliner) RedisRepository[E, ID]

type RedisRepositoryImpl

type RedisRepositoryImpl[E RedisEntity[ID], ID RedisEntityId] struct {
	// contains filtered or unexported fields
}

func NewRedisRepositoryImpl

func NewRedisRepositoryImpl[E RedisEntity[ID], ID RedisEntityId](ctx context.Context, pipe redis.Pipeliner) *RedisRepositoryImpl[E, ID]

func (*RedisRepositoryImpl[E, ID]) Delete

func (r *RedisRepositoryImpl[E, ID]) Delete(e E) error

func (*RedisRepositoryImpl[E, ID]) DeleteAll

func (r *RedisRepositoryImpl[E, ID]) DeleteAll(e ...E) (count int64, err error)

func (*RedisRepositoryImpl[E, ID]) DeleteAllById

func (r *RedisRepositoryImpl[E, ID]) DeleteAllById(id ...ID) (count int64, err error)

func (*RedisRepositoryImpl[E, ID]) DeleteById

func (r *RedisRepositoryImpl[E, ID]) DeleteById(id ID) error

func (*RedisRepositoryImpl[E, ID]) FindAllById

func (r *RedisRepositoryImpl[E, ID]) FindAllById(id ...ID) (res []E, err error)

func (*RedisRepositoryImpl[E, ID]) FindById

func (r *RedisRepositoryImpl[E, ID]) FindById(id ID) (e E, err error)

func (*RedisRepositoryImpl[E, ID]) Save

func (r *RedisRepositoryImpl[E, ID]) Save(e E) error

func (*RedisRepositoryImpl[E, ID]) SaveAll

func (r *RedisRepositoryImpl[E, ID]) SaveAll(e ...E) (count int64, err error)

Jump to

Keyboard shortcuts

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