Back to godoc.org

Package openapi

v0.0.0-...-9649366
Latest Go to latest

The highest tagged major version is .

Published: Nov 21, 2019 | License: Apache-2.0 | Module: github.com/chronosphereiox/m3

Index

Constants

const (
	// URL is the url for the OpenAPI handler.
	URL = handler.RoutePrefixV1 + "/openapi"

	// HTTPMethod is the HTTP method used with this resource.
	HTTPMethod = http.MethodGet
)

Variables

var (
	// StaticURLPrefix is the url prefix for openapi specs.
	StaticURLPrefix = URL + "/static/"
)

func NewDocHandler

func NewDocHandler(
	instrumentOpts instrument.Options,
) http.Handler

NewDocHandler returns a new doc handler.

func StaticHandler

func StaticHandler() http.Handler

StaticHandler is the handler for serving static assets (including OpenAPI specs).

type DocHandler

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

DocHandler handles serving the OpenAPI doc.

func (*DocHandler) ServeHTTP

func (h *DocHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves the OpenAPI doc.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier