Documentation ¶
Index ¶
- type CahceModel
- type DBModel
- type Database
- type RedisModel
- func (rm *RedisModel) CacheURL(ctx context.Context, url URLS) error
- func (rm *RedisModel) FetchURL(ctx context.Context, ShortenedURL string) (string, error)
- func (rm *RedisModel) GetTTL(ctx context.Context, shortenURL string) (time.Duration, error)
- func (rm *RedisModel) SetTTL(ctx context.Context, shortenURL string, ttl time.Duration) error
- type URLModel
- type URLS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CahceModel ¶
type RedisModel ¶
func NewRedisModel ¶
func NewRedisModel(client *redis.Client, ttl time.Duration) *RedisModel
Click to show internal directories.
Click to hide internal directories.