router

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(router *Router)

func ContentType

func ContentType(contentType string) Option

ContentType Set request contentType

func Deprecated

func Deprecated() Option

Deprecated mark api is deprecated

func Description

func Description(description string) Option

func Exclude

func Exclude() Option

Exclude exclude in docs

func Handlers

func Handlers(handlers ...gin.HandlerFunc) Option

func OperationID

func OperationID(ID string) Option

func Responses

func Responses(response Response) Option

func Security

func Security(securities ...security.ISecurity) Option

func Summary

func Summary(summary string) Option

func Tags

func Tags(tags ...string) Option

type Response

type Response map[string]ResponseItem

type ResponseItem

type ResponseItem struct {
	Description string
	Model       interface{}
	Headers     openapi3.Headers
}

type Router

type Router struct {
	Handlers    *list.List
	Path        string
	Method      string
	Summary     string
	Description string
	Deprecated  bool
	ContentType string
	Tags        []string
	API         interface{}
	OperationID string
	Exclude     bool
	Securities  []security.ISecurity
	Response    Response
}

func New

func New(api interface{}, options ...Option) *Router

func (*Router) GetHandlers

func (router *Router) GetHandlers() []gin.HandlerFunc

Jump to

Keyboard shortcuts

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