repositories

package
v0.0.0-...-01827ce Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbRepository

type DbRepository struct {
}

Database repository struct

type UrlsRepository

type UrlsRepository struct {

	// urls channel max length
	ChannelMaxLength int
}

Urls repository struct

func (*UrlsRepository) GenerateShortUrls

func (urlsRepository *UrlsRepository) GenerateShortUrls(Urls map[string]string, request *http.Request) (map[string]string, bool)

Generate short urls from the given long urls

func (*UrlsRepository) GetLongUrl

func (urlsRepository *UrlsRepository) GetLongUrl(shortUrl string) (bool, string)

Get long url from the given short url

func (*UrlsRepository) GetLongUrls

func (urlsRepository *UrlsRepository) GetLongUrls(body io.ReadCloser) map[string]string

Get long urls from given data

Jump to

Keyboard shortcuts

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