Skip to content

Commit 54d51f4

Browse files
committed
Release: v1.0.29-alpha
1 parent 389f607 commit 54d51f4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

redis-storage.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func NewRedisStorage(symbol string, interval time.Duration, config map[string]in
4646

4747
// Implemenet the Storage interface for RedisStorage.
4848
// All returns all the values.
49-
func (s *RedisStorage) All() ([]*Candle, error) {
49+
func (s *RedisStorage) All() (*Quota, error) {
5050
s.mutex.RLock()
5151
defer s.mutex.RUnlock()
5252

@@ -56,7 +56,7 @@ func (s *RedisStorage) All() ([]*Candle, error) {
5656
return nil, fmt.Errorf("failed to get the timestamps from redis: %s", err)
5757
}
5858

59-
var candles []*Candle
59+
var quota Quota
6060

6161
// Retrieve the values.
6262
for _, ts := range timestamps {
@@ -75,10 +75,10 @@ func (s *RedisStorage) All() ([]*Candle, error) {
7575
if err != nil {
7676
return nil, fmt.Errorf("failed to deserialize the candle for %s: %v", key, err)
7777
}
78-
candles = append(candles, candle)
78+
quota = append(quota, candle)
7979
}
8080

81-
return candles, nil
81+
return &quota, nil
8282
}
8383

8484
// Get retrieves the value for the given key.

storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
// Storage is an interface for storing and retrieving candles.
88
type Storage interface {
99
// All returns all the candle in the storage.
10-
All(symbol string, interval time.Duration) (*Quota, error)
10+
All() (*Quota, error)
1111

1212
// Get retrieves candle from the storage.
1313
Get(openTime time.Time) (*Candle, error)

0 commit comments

Comments
 (0)