Documentation
¶
Index ¶
- type AnalyticsData
- type RedisConnection
- func (rc *RedisConnection) Close() error
- func (rc *RedisConnection) Connect(host string, port string) error
- func (rc *RedisConnection) ExecuteCommand(cmd string) (interface{}, error)
- func (rc *RedisConnection) FlushAll() error
- func (rc *RedisConnection) GetAllKeys() ([]string, error)
- func (rc *RedisConnection) GetAnalytics() (*AnalyticsData, error)
- func (rc *RedisConnection) GetTTL(key string) (time.Duration, error)
- func (rc *RedisConnection) GetValue(key string) (string, error)
- func (rc *RedisConnection) IsConnected() bool
- func (rc *RedisConnection) KeyExists(key string) (bool, error)
- func (rc *RedisConnection) RefreshData() ([]string, error)
- func (rc *RedisConnection) ServeAnalytics() error
- func (rc *RedisConnection) SetKeyWithTTL(key string, value string, ttl time.Duration) error
- func (rc *RedisConnection) UpdateKey(key string, value string, keepTTL bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsData ¶
type AnalyticsData struct {
TotalKeys int64 `json:"totalKeys"`
PersistentKeys int64 `json:"persistentKeys"`
ExpiringKeys int64 `json:"expiringKeys"`
MemoryUsedBytes int64 `json:"memoryUsedBytes"`
MemoryTotalBytes int64 `json:"memoryTotalBytes"`
KeyExpirations map[string]int `json:"keyExpirations"`
}
type RedisConnection ¶
type RedisConnection struct {
// contains filtered or unexported fields
}
func NewRedisConnection ¶
func NewRedisConnection() *RedisConnection
func (*RedisConnection) Close ¶
func (rc *RedisConnection) Close() error
func (*RedisConnection) Connect ¶
func (rc *RedisConnection) Connect(host string, port string) error
func (*RedisConnection) ExecuteCommand ¶
func (rc *RedisConnection) ExecuteCommand(cmd string) (interface{}, error)
func (*RedisConnection) FlushAll ¶
func (rc *RedisConnection) FlushAll() error
func (*RedisConnection) GetAllKeys ¶
func (rc *RedisConnection) GetAllKeys() ([]string, error)
func (*RedisConnection) GetAnalytics ¶
func (rc *RedisConnection) GetAnalytics() (*AnalyticsData, error)
Existing helper functions remain the same (GetAnalytics, getBucket, openBrowser)
func (*RedisConnection) GetTTL ¶
func (rc *RedisConnection) GetTTL(key string) (time.Duration, error)
func (*RedisConnection) IsConnected ¶
func (rc *RedisConnection) IsConnected() bool
func (*RedisConnection) RefreshData ¶
func (rc *RedisConnection) RefreshData() ([]string, error)
Optional: Refresh data method if needed
func (*RedisConnection) ServeAnalytics ¶
func (rc *RedisConnection) ServeAnalytics() error
func (*RedisConnection) SetKeyWithTTL ¶
Click to show internal directories.
Click to hide internal directories.