rest

package
Version: v1.13.9 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package rest houses all routes and server logic for all communication over REST. *

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableDirectoryListingHandler added in v1.13.1

func DisableDirectoryListingHandler(h http.Handler) http.Handler

DisableDirectoryListingHandler prevents directory listings to be returned to the user-agent.

Types

type Server

type Server struct {
	Router        *tracingRouter.Router
	SecretManager secrets.SecretManager
	MetricClient  metricService
	OktaService   oktaService
	Tracer        *monitoring.Tracer
	// ServiceName is used for tracing purposes
	ServiceName string
}

Server houses all dependencies and routing of the server.

func NewServer

func NewServer(serviceName string) *Server

NewServer creates a new instance of server and sets up routes.

func (*Server) ServeHTTP

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL