Documentation ¶
Index ¶
- Constants
- func CountRedirects(accesses []entity.ShortyAccess) int
- type QRCodeService
- type ShortyService
- func (s *ShortyService) Create(req *request.CreateShorty) (*entity.Shorty, error)
- func (s *ShortyService) CreateVisit(publicID string, req *request.Redirect) (*entity.Shorty, error)
- func (s *ShortyService) DeleteShortyByUUID(id uuid.UUID) error
- func (s *ShortyService) FindAllAccessesByShortyID(id uuid.UUID) []entity.ShortyAccess
- func (s *ShortyService) FindShortyByID(id uuid.UUID) (*entity.Shorty, error)
- func (s *ShortyService) FindShortyByPublicID(publicID string) (*entity.Shorty, error)
- func (s *ShortyService) List(limit, offset int) ([]*entity.Shorty, error)
- func (s *ShortyService) Update(req *request.UpdateShorty, m *entity.Shorty) (*entity.Shorty, error)
Constants ¶
View Source
const ( PublicIDSize = 10 StatusRedirected = "redirected" StatusBlocked = "blocked" StatusExpired = "expired" StatusLimitReached = "limit_reached" StatusDeleted = "deleted" VersionStringify = "%s %s" TransparentBackground = "transparent" )
Variables ¶
This section is empty.
Functions ¶
func CountRedirects ¶
func CountRedirects(accesses []entity.ShortyAccess) int
Types ¶
type QRCodeService ¶
type QRCodeService struct {
// contains filtered or unexported fields
}
func NewQRCodeService ¶
func NewQRCodeService(logo string) *QRCodeService
type ShortyService ¶
type ShortyService struct {
// contains filtered or unexported fields
}
func NewShortyService ¶
func NewShortyService( hostName, logo string, log *zap.Logger, shortyRepository *entity.ShortyRepository, shortyAccessRepository *entity.ShortyAccessRepository, qrSvc *QRCodeService, ) *ShortyService
func (*ShortyService) Create ¶
func (s *ShortyService) Create(req *request.CreateShorty) (*entity.Shorty, error)
func (*ShortyService) CreateVisit ¶
func (*ShortyService) DeleteShortyByUUID ¶
func (s *ShortyService) DeleteShortyByUUID(id uuid.UUID) error
func (*ShortyService) FindAllAccessesByShortyID ¶
func (s *ShortyService) FindAllAccessesByShortyID(id uuid.UUID) []entity.ShortyAccess
func (*ShortyService) FindShortyByID ¶
func (*ShortyService) FindShortyByPublicID ¶
func (s *ShortyService) FindShortyByPublicID(publicID string) (*entity.Shorty, error)
func (*ShortyService) List ¶
func (s *ShortyService) List(limit, offset int) ([]*entity.Shorty, error)
func (*ShortyService) Update ¶
func (s *ShortyService) Update(req *request.UpdateShorty, m *entity.Shorty) (*entity.Shorty, error)
Click to show internal directories.
Click to hide internal directories.