url

package
v0.0.0-...-d66a43f Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UrlConfiguration

type UrlConfiguration func(*UrlService) error

func WithPostgresURLRepository

func WithPostgresURLRepository(config config.Posgres) UrlConfiguration

func WithRedisCacheRepository

func WithRedisCacheRepository(config config.Redis) UrlConfiguration

type UrlService

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

func New

func New(cfgs ...UrlConfiguration) (*UrlService, error)

func (*UrlService) Add

func (s *UrlService) Add(original string, user *entity.User) (string, error)

func (*UrlService) Get

func (s *UrlService) Get(shortened string) (aggregate.URL, error)

Jump to

Keyboard shortcuts

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