Documentation ¶
Index ¶
- Constants
- Variables
- func Decode(s string) int64
- func Encode(i int64) string
- func GenerateKeys()
- func Shortener()
- type Configuration
- type RedisConf
- func (conf *RedisConf) ActivateUser(key string)
- func (conf *RedisConf) Add(item *ShortenedURL) (err error)
- func (conf *RedisConf) Decode(b []byte, v interface{}) error
- func (conf *RedisConf) Delete(key string) (bool, error)
- func (conf *RedisConf) Encode(v interface{}) ([]byte, error)
- func (conf *RedisConf) Exists(key string) (bool, error)
- func (conf *RedisConf) Get(key string, e interface{}) (interface{}, error)
- func (conf *RedisConf) LPush(key string, val ...string) (int64, error)
- func (conf *RedisConf) NewPool() *redis.Pool
- func (conf *RedisConf) RPush(key string, val ...string) (int64, error)
- type ShortenedURL
- type Stats
- type User
- type WebConf
Constants ¶
View Source
const ( ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789" BASE = int64(len(ALPHABET)) )
Variables ¶
View Source
var (
NewKey chan string
)
View Source
var (
ShortUrls chan string
)
Functions ¶
func GenerateKeys ¶
func GenerateKeys()
Creates a buffered channel which holds 32 uuid's The goroutine is non-blocking as long as the channel is not full
Types ¶
type Configuration ¶
type RedisConf ¶
func NewFactory ¶
func (*RedisConf) ActivateUser ¶
func (*RedisConf) Add ¶
func (conf *RedisConf) Add(item *ShortenedURL) (err error)
type ShortenedURL ¶
Click to show internal directories.
Click to hide internal directories.