server

package
v0.0.0-...-70c7384 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGetGitHubAuthLink(provider gitHubAuthLinkProvider) echo.HandlerFunc

func HandleGitHubAuthCallback

func HandleGitHubAuthCallback(cbProvider callbackProvider) echo.HandlerFunc

func HandleRedirect

func HandleRedirect(redirecter redirecter) echo.HandlerFunc

func HandleShorten

func HandleShorten(shortener shortener) echo.HandlerFunc

func HandleStatic

func HandleStatic() echo.HandlerFunc

func HandleStats

func HandleStats(provider shorteningProvider) echo.HandlerFunc

func HandleTokenPage

func HandleTokenPage() echo.HandlerFunc

func NewValidator

func NewValidator() *requestValidator

Types

type CloseFunc

type CloseFunc func(context.Context) error

type Server

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

func New

func New(shortener *shorten.Service, auth *auth.Service) *Server

func (*Server) AddCloser

func (s *Server) AddCloser(closer CloseFunc)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) Shutdown

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

Jump to

Keyboard shortcuts

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