terse-URL

module
v0.0.0-...-216fc9e Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT

README

terse URL

Go Report Card Go Reference

Currently under development.

Configuration

Environment variable table:

Name Description Default Value Example Value
DEFAULT_TIMEOUT The amount of time to wait before timing out for an incoming (client) or an outgoing (database) request in seconds. 60 180
INVALID_PATHS A comma separated list of paths that cannot be assigned to a shortened URL. Whitespace prefixes and suffixes are trimmed. All swagger endpoints like api are invalid. swagger endpoints ready ,live, v2
SHORTID_PARANOID Indicate whether randomly generated short URLs should be checked to see if they are already in use. Any value sets the boolean to true. Empty for false. blank true
SHORTID_SEED The seed to give the random shortened URL generator. Unsigned 64 bit integer. It is recommend to set this in a production setting. System clock 2301015
TEMPLATE_PATH The full or relative path to the HTML template to use when a shortened URL is requested and JavaScript fingerprinting or social media link previews are on. socialMediaLinkPreview.gohtml customTemplate.gohtml
TERSE_STORE_JSON The JSON formatted storage configuration for the TerseStore. If empty, it will try to read the file at terseStore.json. If not found it will use an in memory implementation. blank {"type":"bbolt","bboltPath":"terse.bbolt"}
VISITS_STORE_JSON The JSON formatted storage configuration for the VisitsStore. If empty, it will try to read the file at visitsStore.json. If not found, visits will not be tracked. blank {"type":"bbolt","bboltPath":"visits.bbolt"}
WORKER_COUNT The quantity of workers to use for incoming request async tasks like performing async database calls. Not the number of incoming requests that can be handled at one time. 4 10
JSON formatted storage configuration

TODO

TODO

  • Address TODOs.
  • Social media link preview inherit mode that gets the Original URL and uses the meta tags for that.
  • Write a utility that will export .bbolt to JSON.
  • Implement SHORTID_PARANOID.
  • Allow for shortened URLs of the form {owner}/{shortened} in /api/write/{operation} endpoint.
    • Only allow for random shortened URLs in top level.
  • Implement fingerprinting with fingerprintjs, but remove HTML canvas extraction. Embed minified in single HTML template.
  • Find all potential nil pointer dereferences due to data being stored in backend storage that does not conform to swagger spec.
  • Implement Redis storage backend?
  • Implement pluggable store interface implementations.
  • Visit counts in TerseStore.
  • Reimplement Mongo storage.
  • Write tests.
  • Write a good README.md.
  • Move frontend to another repo.
  • Implement JWT + JWKS authentication?
  • Implement social media link previews.
  • Implement /api/import endpoints.
  • Flag strategy.
  • Implement bbolt storage backend.
  • Configure storage backends via config files?
  • Change user created warnings to info.
  • Take away auth.
  • Move things to /api.
  • Add an /upsert endpoint.
  • Add an /randomUltraSafe endpoint.

Directories

Path Synopsis
cmd
Package restapi Terse URL The Terse URL shortener.
Package restapi Terse URL The Terse URL shortener.

Jump to

Keyboard shortcuts

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