Documentation ¶
Index ¶
- Constants
- type BigCacheDataSourceImpl
- func (r *BigCacheDataSourceImpl) Delete(ctx context.Context, model dto.IRepoEntity) error
- func (r *BigCacheDataSourceImpl) DeleteListKeys(ctx context.Context, model dto.IRepoEntity) error
- func (r *BigCacheDataSourceImpl) DeleteWithKey(ctx context.Context, key string) error
- func (r *BigCacheDataSourceImpl) Get(ctx context.Context, model dto.IRepoEntity, _ ...time.Duration) (dto.IRepoEntity, error)
- func (r *BigCacheDataSourceImpl) GetListItem(ctx context.Context, model dto.IRepoEntity, sq *domain.SearchQuery, ...) (*dto.List, error)
- func (r *BigCacheDataSourceImpl) GetListKeys(ctx context.Context, model dto.IRepoEntity) ([]string, error)
- func (r *BigCacheDataSourceImpl) Set(ctx context.Context, model dto.IRepoEntity, _ ...time.Duration) (dto.IRepoEntity, error)
- func (r *BigCacheDataSourceImpl) SetListItem(ctx context.Context, model []dto.IRepoEntity, sq *domain.SearchQuery, ...) error
- type RedisCacheDataSourceImpl
- func (r *RedisCacheDataSourceImpl) Delete(ctx context.Context, model dto.IRepoEntity) error
- func (r *RedisCacheDataSourceImpl) DeleteListKeys(ctx context.Context, model dto.IRepoEntity) error
- func (r *RedisCacheDataSourceImpl) DeleteWithKey(ctx context.Context, key string) error
- func (r *RedisCacheDataSourceImpl) Get(ctx context.Context, model dto.IRepoEntity, ttl ...time.Duration) (dto.IRepoEntity, error)
- func (r *RedisCacheDataSourceImpl) GetListItem(ctx context.Context, model dto.IRepoEntity, sq *domain.SearchQuery, ...) (*dto.List, error)
- func (r *RedisCacheDataSourceImpl) GetListKeys(ctx context.Context, model dto.IRepoEntity) ([]string, error)
- func (r *RedisCacheDataSourceImpl) Set(_ context.Context, model dto.IRepoEntity, _ ...time.Duration) (dto.IRepoEntity, error)
- func (r *RedisCacheDataSourceImpl) SetListItem(_ context.Context, _ []dto.IRepoEntity, _ *domain.SearchQuery, _ int64, ...) error
Constants ¶
View Source
const ( ErrorCodeCacheSet = domainerrors.ErrorCodeInfraDatasource + domainerrors.ErrorCodeInfraDatasource + domainerrors.ErrorCodeInfraDatasourceCache + iota ErrorCodeCacheDelete ErrorCodeCacheGet )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigCacheDataSourceImpl ¶
type BigCacheDataSourceImpl struct {
Cache *bigcache.BigCache
}
BigCacheDataSourceImpl -.
func NewBigCacheDataSourceImp ¶
func NewBigCacheDataSourceImp(cache *bigcache.BigCache) *BigCacheDataSourceImpl
NewBigCacheDataSourceImpl -.
func (*BigCacheDataSourceImpl) Delete ¶
func (r *BigCacheDataSourceImpl) Delete(ctx context.Context, model dto.IRepoEntity) error
Delete -.
func (*BigCacheDataSourceImpl) DeleteListKeys ¶
func (r *BigCacheDataSourceImpl) DeleteListKeys(ctx context.Context, model dto.IRepoEntity) error
DeleteListKeys -.
func (*BigCacheDataSourceImpl) DeleteWithKey ¶
func (r *BigCacheDataSourceImpl) DeleteWithKey(ctx context.Context, key string) error
func (*BigCacheDataSourceImpl) Get ¶
func (r *BigCacheDataSourceImpl) Get(ctx context.Context, model dto.IRepoEntity, _ ...time.Duration) (dto.IRepoEntity, error)
Get -.
func (*BigCacheDataSourceImpl) GetListItem ¶
func (r *BigCacheDataSourceImpl) GetListItem(ctx context.Context, model dto.IRepoEntity, sq *domain.SearchQuery, _ ...time.Duration) (*dto.List, error)
GetListItem -.
func (*BigCacheDataSourceImpl) GetListKeys ¶
func (r *BigCacheDataSourceImpl) GetListKeys(ctx context.Context, model dto.IRepoEntity) ([]string, error)
GetListKeys -.
func (*BigCacheDataSourceImpl) Set ¶
func (r *BigCacheDataSourceImpl) Set(ctx context.Context, model dto.IRepoEntity, _ ...time.Duration) (dto.IRepoEntity, error)
Set -.
func (*BigCacheDataSourceImpl) SetListItem ¶
func (r *BigCacheDataSourceImpl) SetListItem(ctx context.Context, model []dto.IRepoEntity, sq *domain.SearchQuery, count int64, _ ...time.Duration) error
SetListItem -.
type RedisCacheDataSourceImpl ¶
type RedisCacheDataSourceImpl struct { Client *rockscache.Client SQLDataSource datasource.IDataSource }
RedisCacheDataSourceImpl -.
func NewRedisCacheDataSourceImpl ¶
func NewRedisCacheDataSourceImpl(client *rockscache.Client, sqlDatasource datasource.IDataSource) *RedisCacheDataSourceImpl
NewRedisCacheDataSourceImpl -.
func (*RedisCacheDataSourceImpl) Delete ¶
func (r *RedisCacheDataSourceImpl) Delete(ctx context.Context, model dto.IRepoEntity) error
Delete -.
func (*RedisCacheDataSourceImpl) DeleteListKeys ¶
func (r *RedisCacheDataSourceImpl) DeleteListKeys(ctx context.Context, model dto.IRepoEntity) error
DeleteListKeys -.
func (*RedisCacheDataSourceImpl) DeleteWithKey ¶
func (r *RedisCacheDataSourceImpl) DeleteWithKey(ctx context.Context, key string) error
func (*RedisCacheDataSourceImpl) Get ¶
func (r *RedisCacheDataSourceImpl) Get(ctx context.Context, model dto.IRepoEntity, ttl ...time.Duration) (dto.IRepoEntity, error)
GetByID -.
func (*RedisCacheDataSourceImpl) GetListItem ¶
func (r *RedisCacheDataSourceImpl) GetListItem(ctx context.Context, model dto.IRepoEntity, sq *domain.SearchQuery, ttl ...time.Duration) (*dto.List, error)
GetListItem -.
func (*RedisCacheDataSourceImpl) GetListKeys ¶
func (r *RedisCacheDataSourceImpl) GetListKeys(ctx context.Context, model dto.IRepoEntity) ([]string, error)
func (*RedisCacheDataSourceImpl) Set ¶
func (r *RedisCacheDataSourceImpl) Set(_ context.Context, model dto.IRepoEntity, _ ...time.Duration) (dto.IRepoEntity, error)
Set -.
func (*RedisCacheDataSourceImpl) SetListItem ¶
func (r *RedisCacheDataSourceImpl) SetListItem(_ context.Context, _ []dto.IRepoEntity, _ *domain.SearchQuery, _ int64, _ ...time.Duration) error
SetListItem -.
Click to show internal directories.
Click to hide internal directories.