server

package
v0.0.0-...-7238798 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgStatusOK = []byte("{\"status\": \"OK\"}")
)

JSON messages

Functions

This section is empty.

Types

type Server

type Server struct {
	SVC             *http.Server
	AccountProvider account.AccountProvider
}

Server is struct with HTTP server and UserService

func NewServer

func NewServer(cfg config.Config, accountProvider account.AccountProvider) (*Server, error)

NewServer - initialize the http server

func (*Server) Run

func (srv *Server) Run()

Run - function for run server. Support graceful shutdown.

type StatusRecorder

type StatusRecorder struct {
	http.ResponseWriter
	Status int
}

func (*StatusRecorder) WriteHeader

func (r *StatusRecorder) WriteHeader(status int)

Directories

Path Synopsis
handlers

Jump to

Keyboard shortcuts

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