server

package
v0.0.0-...-ea7ac5c Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 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 PictureHandler

type PictureHandler interface {
	GetByDate(w http.ResponseWriter, r *http.Request)
	List(w http.ResponseWriter, r *http.Request)
}

type Server

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

Server contains methods for serving and shutting down the server.

func New

func New(cfg *config.Config, handler PictureHandler) *Server

New configures routes and returns a server instance.

func (Server) Serve

func (s Server) Serve() error

Serve starts initialized server.

func (Server) Shutdown

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

Shutdown stops initialized server with provided context.

Jump to

Keyboard shortcuts

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