shortener

package
v0.0.0-...-df11c48 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2016 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewShorten

type NewShorten struct {
	U          *url.URL
	CustomHost string
	Token      string
	NumBytes   int
}

NewShorten is the type used to input your urls to short using: NewShorten{customize}.Shorten()

func (*NewShorten) Shorten

func (n *NewShorten) Shorten() (*url.URL, error)

Shorten recieves your customHost and applies to the url to be returned By default It uses tokenGenerator to generate your url tokens so you can insert It on your DB, but If you change the Token's name It'll use hashGenerator (If you wish to search for It on your DB and prevent doubled links)

Jump to

Keyboard shortcuts

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