service

package
v0.0.0-...-16cb402 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 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 interface {
	ShortenLink(c echo.Context) error
	GetLongLink(c echo.Context) error
}

Service is interface to strict service methods.

func New

func New(linkRepo repository.Linker, counter counter.Counter, app *model.App) Service

type ShortenLinkRequest

type ShortenLinkRequest struct {
	LongLink string `json:"long_link" form:"long_link"`
}

ShortenLinkRequest ...

type ShortenLinkResponse

type ShortenLinkResponse struct {
	ShortLink string `json:"short_link,omitempty"`
	Error     error  `json:"error,omitempty"`
}

ShortenLinkResponse ...

Jump to

Keyboard shortcuts

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