Няма описание

Frederic G. MARAND a142e6531a Added a CLI command hierarchy using spf13/cobra. Storage WIP. преди 10 години
command a142e6531a Added a CLI command hierarchy using spf13/cobra. Storage WIP. преди 10 години
data d42e1996ff WIP on eventinfo, with generic setUp()/tearDown() methods for DB. преди 10 години
doc a142e6531a Added a CLI command hierarchy using spf13/cobra. Storage WIP. преди 10 години
storage a142e6531a Added a CLI command hierarchy using spf13/cobra. Storage WIP. преди 10 години
strategy ea64784e28 Make alias generation actually work for base strategy. преди 10 години
url ea64784e28 Make alias generation actually work for base strategy. преди 10 години
web 6484db1121 Some structural and commenting cleanup. преди 10 години
.gitignore d42e1996ff WIP on eventinfo, with generic setUp()/tearDown() methods for DB. преди 10 години
LICENSE.txt 5ba5ac0c61 First commit: README, GPLv3 license, .gitignore. преди 10 години
Makefile d42e1996ff WIP on eventinfo, with generic setUp()/tearDown() methods for DB. преди 10 години
README.md ecf5044df5 Working alias generation, inserts into DB, some integration tests. преди 10 години
default.kurz.js a142e6531a Added a CLI command hierarchy using spf13/cobra. Storage WIP. преди 10 години
kurz.go a142e6531a Added a CLI command hierarchy using spf13/cobra. Storage WIP. преди 10 години

README.md

 #    #  #    #  #####   ######
 #   #   #    #  #    #      #
 ####    #    #  #    #     #
 #  #    #    #  #####     #
 #   #   #    #  #   #    #
 #    #   ####   #    #  ######

Kurz is yet another URL shortener/aliaser.

  • built as a Go data model API, for internal site use as well as public use
  • web front end separate from data logic
  • multiple aliasing strategies. provided:
    • identity
    • 32-bits hexa string, leading 0s omitted
    • manual selection
    • easy to extend, by registering additional AliasStrategy objects
  • supporting
    • vanity domains
    • relative paths (API only, no Web UI), for use within web sites
    • "slug"-type multipart aliasing for SEO
  • usage statistics
  • some tests available

It is currently available under the General Public License version 3 or later.

Using Kurz

The main Kurz command show how to initialize the package and access statistics.

You can find usage examples in strategy_test.go:

  • TestBaseAlias() shows how to generate aliases
  • TestUseCounts() show how to query strategy statistics

Running tests

Currently, only the strategy package has tests, and these need some setup, as they touch the database:

  • either redefine the credentials in strategy_test.go#initTestStorage()
  • or create a database with privileges appropriate for them
  • or send a PR submitting a better DB initialization mechanism for tests