shortener

package
v0.0.0-...-81386c3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedirectService

type RedirectService struct {
	// contains filtered or unexported fields
}

func NewRedirectService

func NewRedirectService(redirectRepo ports.RedirectRepository) *RedirectService

func (*RedirectService) Find

func (uc *RedirectService) Find(code string) (*entity.Redirect, error)

func (*RedirectService) Store

func (uc *RedirectService) Store(url string) (*entity.Redirect, error)

type UseCaseShortener

type UseCaseShortener struct {
	// contains filtered or unexported fields
}

func NewUseCaseShortener

func NewUseCaseShortener(redirectServices *RedirectService) *UseCaseShortener

func (*UseCaseShortener) CodeToUrl

func (uc *UseCaseShortener) CodeToUrl(code string) (*entity.Redirect, error)

func (*UseCaseShortener) UrlToCode

func (uc *UseCaseShortener) UrlToCode(url string) (*entity.Redirect, error)

Jump to

Keyboard shortcuts

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