swagger

package module
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultInfoInstanceName = "swagger"

Functions

func Handler

func Handler(opts ...Option) func(w http.ResponseWriter, r *http.Request)

Types

type Option

type Option func(*option)

func WithBasePath

func WithBasePath(basePath string) Option

WithBasePath sets the base path of the API.

func WithConfigFns

func WithConfigFns(fns ...func(*httpSwagger.Config)) Option

func WithDescription

func WithDescription(description string) Option

WithDescription sets the description of the API.

func WithHost

func WithHost(host string) Option

WithHost sets the host of the API.

func WithInfoInstanceName

func WithInfoInstanceName(infoInstanceName string) Option

WithInfoInstanceName sets the name of the swagger instance to be used.

The default name is "swagger".

func WithSchemes

func WithSchemes(schemes ...string) Option

WithSchemes sets the schemes of the API.

func WithTitle

func WithTitle(title string) Option

WithTitle sets the title of the API.

func WithVersion

func WithVersion(version string) Option

WithVersion sets the version of the API.

Jump to

Keyboard shortcuts

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