golinks

module
v1.3.2-0...-4312943 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT

README

MIT license go-build docker-master docker-release Go Report Card go.dev reference

Golinks is a open-sourced short link redirect service in Golang, under MIT-license.

index

Feature Highlights

  • Golinks styled (go/mylink) short link redirect
  • Parameter substitution (go/mylink/{VAR} -> https://mylink.com/{VAR}/mypage)
  • Multiple organizations(namespaces) support
  • Out-of-box solution with public docker image haosutdio/golinks
  • Tracing with Jaeger

Get started

Run with docker
$ docker run -v \
  /path/to/datadir:/opt/golinks/datadir \
  -p 8000:8000 \
  haostudio/golinks
Run with source code
Build binary
# Clone repo
$ git clone https://github.com/haostudio/golinks
# Install dependencies
$ make deps
# Build binary
$ make golinks
# Run
$ ./build/golinks

Advanced options

Run in NoAuth mode

By default, golinks supports multiple organizations with JWT authentication. The links of different organizations are stored in different namespaces. Running golinks in NoAuth mode disables authentication and stores all the links in a shared namespace of the default org.

$ docker run -v \
  /path/to/datadir:/opt/golinks/datadir \
  -p 8000:8000 \
  -e AUTHPROVIDER_NOAUTH_ENABLED=true \
  -e AUTHPROVIDER_NOAUTH_DEFAULTORG=my_org \ # optional
  haostudio/golinks
Enable static wiki site
$ docker run -v \
  /path/to/datadir:/opt/golinks/datadir \
  -p 8000:8000 \
  -e HTTP_GOLINKS_WIKI=true \
  haostudio/golinks

For more options, checkout the configuration guide

Demo

edit_link

Jump to

Keyboard shortcuts

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