server

package
v0.0.0-...-aee3e03 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteServiceResponse

func WriteServiceResponse(w http.ResponseWriter, data interface{}, err error)

WriteServiceResponse ...

Types

type Server

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

Server ...

func New

func New(name string, address string, auth security.Service, logger logging.Service) *Server

New creates a new Server and returns its address

func (*Server) Run

func (s *Server) Run()

Run ...

func (*Server) RunWithTLS

func (s *Server) RunWithTLS(certFile, keyFile string)

RunWithTLS ...

func (*Server) ServeAnimations

func (s *Server) ServeAnimations() http.HandlerFunc

ServeAnimations ...

func (*Server) ServeFonts

func (s *Server) ServeFonts() http.HandlerFunc

ServeFonts ...

func (*Server) ServeIcons

func (s *Server) ServeIcons() http.HandlerFunc

ServeIcons ...

func (*Server) ServeManifest

func (s *Server) ServeManifest() http.HandlerFunc

ServeManifest ...

func (*Server) ServeRegister

func (s *Server) ServeRegister() http.HandlerFunc

ServeRegister ...

func (*Server) ServeServiceWorker

func (s *Server) ServeServiceWorker() http.HandlerFunc

ServeServiceWorker ...

func (*Server) ServeSignin

func (s *Server) ServeSignin() http.HandlerFunc

ServeSignin ...

func (*Server) ServeStatic

func (s *Server) ServeStatic(prefix, path string) http.HandlerFunc

ServeStatic ...

func (*Server) ServeWebAssemblyApp

func (s *Server) ServeWebAssemblyApp(filename string) http.HandlerFunc

ServeWebAssemblyApp ...

func (*Server) ServeWebAssemblyRuntime

func (s *Server) ServeWebAssemblyRuntime(pattern string) http.HandlerFunc

ServeWebAssemblyRuntime ...

func (*Server) WithAuth

func (s *Server) WithAuth(handler http.Handler) http.HandlerFunc

func (*Server) WithCompression

func (s *Server) WithCompression(handler http.Handler) http.HandlerFunc

func (*Server) WithDefaults

func (s *Server) WithDefaults(handler http.Handler) http.HandlerFunc

func (*Server) WithStrictTransportSecurity

func (s *Server) WithStrictTransportSecurity(handler http.Handler) http.HandlerFunc

type ServiceRequest

type ServiceRequest struct {
	Method string      `json:"method"`
	Params interface{} `json:"params"`
}

ServiceRequest ...

func ParseServiceRequest

func ParseServiceRequest(r *http.Request) (sr *ServiceRequest, err error)

ParseServiceRequest ...

type ServiceResponse

type ServiceResponse struct {
	Data  interface{} `json:"data,omitempty"`
	Error string      `json:"error,omitempty"`
}

ServiceResponse ...

Jump to

Keyboard shortcuts

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