feat: hltb plugin
This commit is contained in:
parent
c53942ac53
commit
ae3c9f665d
24 changed files with 940 additions and 17 deletions
29
internal/testutil/mock_cache.go
Normal file
29
internal/testutil/mock_cache.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package testutil
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
// MockCache implements the CacheInterface for testing
|
||||
type MockCache struct{}
|
||||
|
||||
func (m *MockCache) Get(key string, destination interface{}) error {
|
||||
return errors.New("cache miss") // Always return cache miss for tests
|
||||
}
|
||||
|
||||
func (m *MockCache) Set(key string, value interface{}, expiration *time.Time) error {
|
||||
return nil // Always succeed for tests
|
||||
}
|
||||
|
||||
func (m *MockCache) SetWithTTL(key string, value interface{}, ttl time.Duration) error {
|
||||
return nil // Always succeed for tests
|
||||
}
|
||||
|
||||
func (m *MockCache) Delete(key string) error {
|
||||
return nil // Always succeed for tests
|
||||
}
|
||||
|
||||
func (m *MockCache) Exists(key string) (bool, error) {
|
||||
return false, nil // Always return false for tests
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue