func GetClientDN(request *http.Request) string
func GetClientIP(request *http.Request) string
func GetClientName(request *http.Request) string
func GetClientRoles(request *http.Request) []string
type Response interface { Headers() map[string]string Status() int Bytes() []byte }
var AccessDeniedResponse Response = &bytesResponse{ StatusCode: http.StatusForbidden, ContentType: "text/plain", Body: []byte("Access denied\r\n"), }
func BytesResponse(body []byte, contentType string) Response
func ErrorResponse(statusCode int) Response
func JSONResponse(data interface{}) (Response, error)
func StringResponse(statusCode int, body string) Response
type Server struct { Config *config.Config ErrorLog *log.Logger Closed <-chan bool // contains filtered or unexported fields }
func New(config *config.Config) (*Server, error)
func (s *Server) CheckKeyAccess(request *http.Request, keyName string) *config.KeyConfig
func (s *Server) Close() error
func (s *Server) Healthy(request *http.Request) bool
func (s *Server) LogError(request *http.Request, err interface{}, traceback []byte) Response
Log an unhandled error with optional traceback
func (s *Server) Logf(format string, args ...interface{})
Log a general message
func (s *Server) Logr(request *http.Request, format string, args ...interface{})
Log a message associated with an ongoing request
func (s *Server) ReopenLogger() error
func (s *Server) ServeHTTP(writer http.ResponseWriter, request *http.Request)