ShortLink

package module
v0.0.0-...-c3373ee Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

README

Golang service to cut links with MongoDB and website. Can run standalone, without http-server, but don't support https. To run it with nginx i placed placed config in configs dir, also you can find Dockerfile and docker-compose.yml here.

With this service you can make you big and ugly links shorter and prettier. You can share not only links, but also a QR-codes.

TODO

  • https support
  • connect to MongoDB with login & password
  • fix some issues in layouts
  • history
  • deleting after timeout

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	Id         string    `bson:"_id"`
	OriginLink string    `bson:"origin_link"`
	CreatedAt  time.Time `bson:"createdAt"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Run

func (s *Server) Run(port int, handler http.Handler) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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