Documentation ¶
Index ¶
- func WithCache[T any](ctx context.Context, cache Cache, key string, ttl time.Duration, ...) (*T, error)
- func WithDeleteCache(ctx context.Context, cache Cache, key string) error
- func WithRefreshCache[T any](ctx context.Context, cache Cache, key string, ttl time.Duration, value *T) (*T, error)
- type Cache
- type MockCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type MockCache ¶
MockCache is an autogenerated mock type for the Cache type
func NewMockCache ¶
NewMockCache creates a new instance of MockCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
Click to show internal directories.
Click to hide internal directories.