Documentation
¶
Index ¶
- func NewGormHashService(db *gorm.DB, logger *zap.Logger) cache.Hash
- func NewGormListService[T any](prefix string, dur time.Duration) cache.CachedList[T]
- type CacheEntry
- type GormHashService
- func (gh *GormHashService) Existed(ctx context.Context, key string) (bool, error)
- func (gh *GormHashService) GetAll(ctx context.Context, key string) (map[string]string, error)
- func (gh *GormHashService) GetValues(ctx context.Context, key string, fields ...string) ([]any, error)
- func (gh *GormHashService) SetTTL(ctx context.Context, key string, ttl time.Duration)
- func (gh *GormHashService) SetValues(ctx context.Context, key string, values map[string]any) error
- type GormListService
- type HashEntry
- type ListEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGormListService ¶
Types ¶
type CacheEntry ¶
type GormHashService ¶
type GormHashService struct {
// contains filtered or unexported fields
}
type GormListService ¶
type GormListService[T any] struct { // contains filtered or unexported fields }
func (*GormListService[T]) Append ¶
func (gl *GormListService[T]) Append(ctx context.Context, key string, raw ...T) error
Click to show internal directories.
Click to hide internal directories.