server

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Alias        alias.Provider
	Auth         auth.Provider
	Storage      storage.Provider
	Log          *log.Logger
	NotFoundHTML []byte

	ListenAddr, PublicURL, RootURL string
}

Config contains the necessary configuration to run the URL shortener

type Klein

type Klein struct {
	Config *Config
	// contains filtered or unexported fields
}

Klein is a URL shortener

func New

func New(c *Config) *Klein

New returns a new Klein instance

func (*Klein) Serve

func (b *Klein) Serve()

Serve starts Klein's HTTP server

Jump to

Keyboard shortcuts

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