Documentation ¶
Index ¶
- type RedisArticleStorage
- func (r *RedisArticleStorage) ExistsByTitle(ctx context.Context, title string) (bool, error)
- func (r *RedisArticleStorage) Random(ctx context.Context) (floridaman.Article, error)
- func (r *RedisArticleStorage) RawRandom(ctx context.Context) ([]byte, error)
- func (r *RedisArticleStorage) Save(ctx context.Context, article floridaman.Article)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisArticleStorage ¶
type RedisArticleStorage struct {
// contains filtered or unexported fields
}
func NewRedisArticleStorage ¶
func NewRedisArticleStorage(client *redis.Client) *RedisArticleStorage
func (*RedisArticleStorage) ExistsByTitle ¶
func (*RedisArticleStorage) Random ¶
func (r *RedisArticleStorage) Random(ctx context.Context) (floridaman.Article, error)
func (*RedisArticleStorage) RawRandom ¶
func (r *RedisArticleStorage) RawRandom(ctx context.Context) ([]byte, error)
func (*RedisArticleStorage) Save ¶
func (r *RedisArticleStorage) Save(ctx context.Context, article floridaman.Article)
Click to show internal directories.
Click to hide internal directories.