api

package
v0.0.0-...-df4207d Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represents a web API server.

func InitAPI

func InitAPI(sender *smsender.Sender) *Server

InitAPI initializes the web API server.

func (*Server) Hello

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

func (*Server) Messages

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

func (*Server) MessagesGetByIds

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

func (*Server) MessagesPost

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

func (*Server) RouteDelete

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

func (*Server) RoutePost

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

func (*Server) RoutePut

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

func (*Server) RouteReorder

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

func (*Server) RouteTest

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

func (*Server) Routes

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

func (*Server) ShutdownMiddleware

func (s *Server) ShutdownMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

ShutdownMiddleware will return http.StatusServiceUnavailable if server is already in shutdown progress.

func (*Server) Stats

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

Jump to

Keyboard shortcuts

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