Documentation ¶
Index ¶
- Constants
- func AliasHandler(rw http.ResponseWriter, r *http.Request)
- func AliasMatcher(r *http.Request, rm *mux.RouteMatch) bool
- func BaseHandler(rw http.ResponseWriter, r *http.Request)
- func BaseMatcher(r *http.Request, rm *mux.RouteMatch) bool
- func CalculateCheckDigit(partialId uint64) uint64
- func CheckSum(id uint64) uint64
- func DecodeFromBase(encodedString string) (uint64, error)
- func EncodeToBase(seedNumber uint64) (string, error)
- func ExtractBaseUrl(r *http.Request, c *redis.Client) (string, error)
- func IsCheckSumValid(id uint64) bool
- func LookupAlias(alias string, c *redis.Client) (string, error)
- func MultiMatcher(r *http.Request, rm *mux.RouteMatch) bool
- func RedirectToBaseHandler(rw http.ResponseWriter, r *http.Request)
- func RegisterAndStart(redisHost string, redisDatabase string, redisPort string, serverPort string, ...)
- func RootHandler(rw http.ResponseWriter, r *http.Request)
- func SetupRedisConnection(serverHost string, serverDb string, serverport string, timeOutSeconds int) (*redis.Client, error)
- func StoreUrl(baseUrl string, c *redis.Client) (string, error)
- func ValidateAlias(alias string) bool
- type UrlMsg
Constants ¶
View Source
const Base10 = 10
View Source
const Base64 = 64
Variables ¶
This section is empty.
Functions ¶
func AliasHandler ¶
func AliasHandler(rw http.ResponseWriter, r *http.Request)
func AliasMatcher ¶
func AliasMatcher(r *http.Request, rm *mux.RouteMatch) bool
func BaseHandler ¶
func BaseHandler(rw http.ResponseWriter, r *http.Request)
func BaseMatcher ¶
func BaseMatcher(r *http.Request, rm *mux.RouteMatch) bool
func CalculateCheckDigit ¶
func DecodeFromBase ¶
func EncodeToBase ¶
func IsCheckSumValid ¶
func MultiMatcher ¶
func MultiMatcher(r *http.Request, rm *mux.RouteMatch) bool
func RedirectToBaseHandler ¶
func RedirectToBaseHandler(rw http.ResponseWriter, r *http.Request)
func RegisterAndStart ¶
func RootHandler ¶
func RootHandler(rw http.ResponseWriter, r *http.Request)
func SetupRedisConnection ¶
func ValidateAlias ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.