storage

package
v0.0.0-...-ff7826b Latest Latest
Warning

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

Go to latest
Published: May 31, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandStringBytes

func RandStringBytes(n int) string

func UpdateStatistics

func UpdateStatistics(storage *Storage, uid string)

Types

type Storage

type Storage struct {
	Address string
	Pool    *redis.Pool
}

func InitStorage

func InitStorage(adr string) *Storage

type Url

type Url struct {
	UID       string `json:"uid"`
	Url       string `json:"url"`
	CreatedAt string `json:"createdAt"` // RFC3339
}

func CreateUrl

func CreateUrl(storage *Storage, urlAddress string) Url

func GetUrl

func GetUrl(storage *Storage, uid string) *Url

Jump to

Keyboard shortcuts

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