docs

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Documentation of SpotifyUtils's API

    Schemes: http, https
    BasePath: /api

    Consumes:
    - application/json

    Produces:
    - application/json

	   Security:
    - CSRFToken: []

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocsHandler

func DocsHandler(res http.ResponseWriter, req *http.Request)

func SwaggerJSONHandler

func SwaggerJSONHandler(res http.ResponseWriter, req *http.Request)

func SwaggerUI added in v1.8.4

func SwaggerUI(opts SwaggerUIOpts, next http.Handler) http.Handler

SwaggerUI creates a middleware to serve a documentation site for a swagger spec. This allows for altering the spec before starting the http listener.

Types

type SwaggerUIOpts added in v1.8.4

type SwaggerUIOpts struct {
	// BasePath for the UI path, defaults to: /
	BasePath string
	// Path combines with BasePath for the full UI path, defaults to: docs
	Path string
	// SpecURL the url to find the spec for
	SpecURL string

	// The three components needed to embed swagger-ui
	SwaggerURL       string
	SwaggerPresetURL string
	SwaggerStylesURL string

	Favicon32 string
	Favicon16 string

	// Title for the documentation site, default to: API documentation
	Title string

	// The name of the header that the csrf token is embedded in
	CSRFTokenHeader string
	CSRFToken       string
}

SwaggerUIOpts configures the Swaggerui middlewares

func (*SwaggerUIOpts) EnsureDefaults added in v1.8.4

func (r *SwaggerUIOpts) EnsureDefaults()

EnsureDefaults in case some options are missing

Jump to

Keyboard shortcuts

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