Documentation
¶
Index ¶
Constants ¶
View Source
const ServiceURL = "https://api.tinyurl.com/create"
ServiceURL is the API endpoint.
Variables ¶
View Source
var ServiceTimeout = 3
ServiceTimeout is the timeout (in seconds) for requests to the TinyURL API.
Functions ¶
This section is empty.
Types ¶
type Service ¶ added in v0.3.6
Service is the short link generation service implementation for TinyURL.
func NewTinyURLService ¶
NewTinyURLService returns a new instance of the TinyURL short link service.
func (Service) Shorten ¶ added in v0.3.6
func (ts Service) Shorten(ctx context.Context, req *shortlink.ServiceRequest) *shortlink.ServiceResponse
Shorten implements the Short Link generation service interface.
Click to show internal directories.
Click to hide internal directories.