Back to godoc.org
github.com/drewsilcock/echo-swagger

Package echoSwagger

v0.0.5
Latest Go to latest

The highest tagged major version is .

Published: Jan 6, 2020 | License: MIT | Module: github.com/drewsilcock/echo-swagger

Index

Variables

var WrapHandler = EchoWrapHandler()

WrapHandler wraps swaggerFiles.Handler and returns echo.HandlerFunc

func EchoWrapHandler

func EchoWrapHandler(confs ...func(c *Config)) echo.HandlerFunc

EchoWrapHandler wraps `http.Handler` into `echo.HandlerFunc`.

func URL

func URL(url string) func(c *Config)

URL presents the url pointing to API definition (normally swagger.json or swagger.yaml).

type Config

type Config struct {
	// If the Swagger specification JSON document is external to the web server, this should be set to the full URL
	// to the specification document.
	ExternalURL *string

	// The information for OAuth2 integration, if any.
	OAuth *OAuthConfig
}

Config stores echoSwagger configuration variables.

type OAuthConfig

type OAuthConfig struct {
	// The ID of the client sent to the OAuth2 IAM provider.
	ClientId string

	// The OAuth2 realm that the client should operate in. If not applicable, use empty string.
	Realm string

	// The name to display for the application in the authentication popup.
	AppName string
}

Configuration for Swagger UI OAuth2 integration. See https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/ for further details.

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