links

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 6 Imported by: 0

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 (s *LinkServiceImpl) GetLink(key string) (string, error)
func (s *LinkServiceImpl) ShortenLink(longLink string) (string, error)

func (*LinkServiceImpl) VisitByKey

func (s *LinkServiceImpl) VisitByKey(key string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL