serveswagger

package
v0.0.0-...-37abd50 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAddr = "localhost:8080"

DefaultAddr holds default localhost info

Variables

View Source
var SwaggerParams = common.ConstParams{
	Year:      time.Now().Year(),
	Logo:      "https://raw.githubusercontent.com/swaggo/swag/master/assets/swaggo.png",
	Framework: "Go-Swagger",
	Addr:      DefaultAddr,
}

SwaggerParams holds default ConstParams for the go-swagger executable

Functions

func HTMLProducer

func HTMLProducer(w io.Writer, data interface{}) error

HTMLProducer is required by swagger in order for the generated server be able to produce the mime type "text/html". The runtime.Producer argument of each handler for the server relies on it to render the pages for the UI.

func RouteHandler

func RouteHandler(rt common.Route, pd *common.ConstParams, req *http.Request) middleware.Responder

RouteHandler returns a middleware.Responder that serves our html and the vulnerable functions.

func Setup

func Setup() (*restapi.Server, error)

Setup sets up the configuration for the go-swagger server

func SwaggerRootHandler

func SwaggerRootHandler(params swagger_server.RootParams) middleware.Responder

SwaggerRootHandler handles the main page of the go-swagger server

Types

This section is empty.

Directories

Path Synopsis
Package shared contains functionality used by `cmd/swagger` at runtime and by `cmd/swagger/regen`.
Package shared contains functionality used by `cmd/swagger` at runtime and by `cmd/swagger/regen`.

Jump to

Keyboard shortcuts

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