Skip to content
/ kgs Public

kgs - Generation key support for shorten url, unique key.

License

Notifications You must be signed in to change notification settings

9bany/kgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kgs - Key generate service

Generation keys support for shorten url, unique key.

Usage

1. Go code

package main

import (
	"fmt"
	"github.com/9bany/kgs/pkg/key0"
)

func main() {
	gen := key0.NewGen(key0.WithLen(int8(len)))
	k, _ := gen.New()
    fmt.Println(k)
}

2. Docker

  1. Build
docker build . -t kgs
  1. Run
docker run -p 8080:8080 kgs:latest
  1. Curl - Get key
curl localhost:8080/key
# {"key":"l6yCLFr"}

Thanks !

About

kgs - Generation key support for shorten url, unique key.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published