shortener

package
v0.0.0-...-c5d5a31 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package shortener shortens urls

Index

Constants

This section is empty.

Variables

View Source
var IsGdProvider provider = "is.gd"

IsGdProvider is a url shortening service

Functions

This section is empty.

Types

type IsGd

type IsGd struct {
	HTTPClient *http.Client
}

IsGd holds settings to shorten urls from is.gd

func (*IsGd) Shorten

func (g *IsGd) Shorten(u *url.URL) (*Response, error)

Shorten shortens a url

type Response

type Response struct {
	Original *url.URL
	Short    *url.URL
	Provider provider
}

Response is a link shortener response

type Service

type Service interface {
	Shorten(u *url.URL) (*Response, error)
}

Service is a url shortening service

Jump to

Keyboard shortcuts

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