redoc

package
v5.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocURI

func DocURI(uri string) func(*Param)

DocURI set the redoc handle source swagger url.

func GetHandler

func GetHandler(opt ...func(*Param)) webfmwk.DocHandler

GetHandler return a DocHandler settup for redoc use of template, params expect the DocURI string.

var opts = []webfmwk.Option{
	webfmwk.WithDocHandlers(redoc.GetHandler(
		redoc.DocURI("/api/v2/docs/swagger.json")
	)
)}

func Path

func Path(path string) func(*Param)

Path set the redoc handler path.

Types

type Param

type Param struct {
	// Path hold the value on which is exposed the handler
	Path string
	// DocURI hold the swagger.json URI
	DocURI string
}

Param hold the required metadata to expose the redoc handler.

Jump to

Keyboard shortcuts

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