Documentation ¶
Index ¶
Constants ¶
View Source
const ( Offset = 1000000 // RedisKeyUrlGlobalId 全局Id RedisKeyUrlGlobalId = "url:global:id" RedisKeyShortUrl = "url:short:%s" RedisKeyUrlDetail = "url:detail:%s" RedisKeyUrlCounter = "url:counter:%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStorage ¶
type RedisStorage struct {
// contains filtered or unexported fields
}
RedisStorage Redis实现短链服务
func NewRedisStorage ¶
func NewRedisStorage() (*RedisStorage, error)
func (*RedisStorage) ShortLinkInfo ¶
func (r *RedisStorage) ShortLinkInfo(sid string) (*entity.UrlDetailInfo, error)
Click to show internal directories.
Click to hide internal directories.