middleware

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RAPIFS embed.FS

Functions

This section is empty.

Types

type OpenApiMiddleware

type OpenApiMiddleware struct {
	*fw.MiddlewareGlobal
	// contains filtered or unexported fields
}

func NewOpenApiMiddleware

func NewOpenApiMiddleware(hasLicenseFile bool, licenseFileContent []byte) *OpenApiMiddleware

func (*OpenApiMiddleware) DoInitOnce added in v0.0.6

func (o *OpenApiMiddleware) DoInitOnce()

func (*OpenApiMiddleware) Router added in v0.0.6

func (o *OpenApiMiddleware) Router(ctx *fw.MiddlewareContext) []*fw.RouteItem

func (*OpenApiMiddleware) SetDocContent added in v0.1.1

func (o *OpenApiMiddleware) SetDocContent(docContent []byte)

type OpenApiOptions added in v0.0.3

type OpenApiOptions struct {
	Redirect bool `yaml:"redirect" default:"true"` //if redirect /doc to /doc/index.html
	//Route    string `yaml:"route" default:"doc"`             // the page route of openapi document. e.g. if your want to serve document at /docA/index.html, just set route to docA
	FileName string `yaml:"fileName" default:"openapi.yaml"` //file path refer to openapi.yaml or openapi.json
	Type     string `yaml:"type" default:"swagger"`          //ui type. swagger\rapi
}

Jump to

Keyboard shortcuts

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