services

package
v0.0.0-...-e3b22c1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKeyGenService

func NewKeyGenService(counter ports.CounterRepository, converter ports.Converter) ports.KeyGenService

func NewShortenerService

func NewShortenerService(urlRepo ports.URLRepository, kgs ports.KeyGenService) ports.ShortenerService

Types

type KeyGen

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

func (*KeyGen) GenerateKey

func (k *KeyGen) GenerateKey(ctx context.Context) (string, error)

type Shortener

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

func (*Shortener) GetLongURL

func (s *Shortener) GetLongURL(ctx context.Context, key string) (string, error)

func (*Shortener) Shorten

func (s *Shortener) Shorten(ctx context.Context, url string) (string, error)

Jump to

Keyboard shortcuts

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