Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultExpireTime = time.Hour * 24 * 31 * 12 * 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkService ¶
type LinkService interface { ShortenLink(link string) (linkKey string, err error) GetLink(linkKey string) (link string, err error) VisitByKey(key string) (err error) }
func New ¶
func New(linkRepo link_repo.LinkRepo, keyService key_service.KeyService) LinkService
type LinkServiceImpl ¶
type LinkServiceImpl struct {
// contains filtered or unexported fields
}
func (*LinkServiceImpl) ShortenLink ¶
func (s *LinkServiceImpl) ShortenLink(longLink string) (string, error)
func (*LinkServiceImpl) VisitByKey ¶
func (s *LinkServiceImpl) VisitByKey(key string) error
Click to show internal directories.
Click to hide internal directories.