Documentation ¶
Index ¶
- type ShortLinkService
- func (s *ShortLinkService) DeleteById(id string) error
- func (s *ShortLinkService) DeleteByKey(key string) error
- func (s *ShortLinkService) Generate(url string) *domain.ShortLink
- func (s *ShortLinkService) GenerateShortLink(name string, url string, duration time.Duration) (*domain.ShortLink, error)
- func (s *ShortLinkService) GetById(id string) (*domain.ShortLink, error)
- func (s *ShortLinkService) GetByKey(key string) (*domain.ShortLink, error)
- func (s *ShortLinkService) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShortLinkService ¶
type ShortLinkService struct { service.BaseService ShortLinkRepository *repository.ShortLinkRepository `inject:"shortLinkRepository"` }
func (*ShortLinkService) DeleteById ¶
func (s *ShortLinkService) DeleteById(id string) error
func (*ShortLinkService) DeleteByKey ¶
func (s *ShortLinkService) DeleteByKey(key string) error
func (*ShortLinkService) Generate ¶
func (s *ShortLinkService) Generate(url string) *domain.ShortLink
func (*ShortLinkService) GenerateShortLink ¶
func (*ShortLinkService) GetById ¶
func (s *ShortLinkService) GetById(id string) (*domain.ShortLink, error)
func (*ShortLinkService) GetByKey ¶
func (s *ShortLinkService) GetByKey(key string) (*domain.ShortLink, error)
func (*ShortLinkService) Start ¶
func (s *ShortLinkService) Start()
Click to show internal directories.
Click to hide internal directories.