service

package
v0.0.0-...-5f35270 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	URL URLService
}

func New

func New(s *storage.Repository, r *redis.Client) *Service

type URLService

type URLService interface {
	AddNewURL(url *entities.URL) (*entities.URL, error)
	FindOneByLongURL(longURL string) (*entities.URL, error)
	FindOneByShortURL(shortURL string) (*entities.URL, error)
	FindOneByID(id int64) (*entities.URL, error)
}

Jump to

Keyboard shortcuts

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