middleware

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type DocConfig added in v0.3.2

type DocConfig struct {
	Urls                   []DocConfigUrl `json:"urls,omitempty"`
	ValidatorUrl           string         `json:"validatorUrl,omitempty"`
	DeepLinking            bool           `json:"deepLinking,omitempty"`
	DocExpansion           string         `json:"docExpansion,omitempty"`
	QueryConfigEnabled     bool           `json:"queryConfigEnabled,omitempty"`
	Url                    string         `json:"url,omitempty"`
	TryItOutEnabled        bool           `json:"tryItOutEnabled,omitempty"`
	SupportedSubmitMethods []string       `json:"supported_submit_methods,omitempty"`
	DisplayRequestDuration bool           `json:"displayRequestDuration,omitempty"`
}

type DocConfigUrl added in v0.3.2

type DocConfigUrl struct {
	URL  string `json:"url,omitempty"`
	Name string `json:"name,omitempty"`
}

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) GetDocType added in v0.3.2

func (o *OpenApiMiddleware) GetDocType() string

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(groupName string, docContent []byte, contentType string)

func (*OpenApiMiddleware) SetMode added in v0.3.2

func (o *OpenApiMiddleware) SetMode(isProd bool)

type OpenApiOptions added in v0.0.3

type OpenApiOptions struct {
	Open           bool   `yaml:"open" default:"false"`   // open browser
	Type           string `yaml:"type" default:"swagger"` //ui type. swagger\rapi\openapi-ui
	Path           string `yaml:"path" default:"/docs"`
	GroupQueryName string `yaml:"groupQueryName" default:"urls.primaryName"`
	OpenApiPath    string `yaml:"openApiPath" default:"/openapi.json"`
}

Jump to

Keyboard shortcuts

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