swag

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasePath

func BasePath(path string) func(*swagger.ApiDeclaration)

func Description

func Description(desc string) func(*swagger.ApiDeclaration)

func Swagger

func Swagger(e *gin.Engine, title string, options ...func(*swagger.ApiDeclaration)) gin.HandlerFunc

func Version

func Version(version string) func(*swagger.ApiDeclaration)

Types

type SchemaGenerator

type SchemaGenerator struct {
	// contains filtered or unexported fields
}

SchemaGenerator is the object users have to manipulate, it internally collects data about packages used by handlers and so on

func NewSchemaGenerator

func NewSchemaGenerator() *SchemaGenerator

NewSchemaGenerator bootstraps a generator, don't instantiate SchemaGenerator yourself

func (*SchemaGenerator) GenerateSwagDeclaration

func (s *SchemaGenerator) GenerateSwagDeclaration(routes map[string]*tonic.Route, basePath, version string, godoc *doc.Infos) error

GenerateSwagDeclaration parses all routes (handlers, structs) and returns ready to serialize/use ApiDeclaration

Directories

Path Synopsis
doc

Jump to

Keyboard shortcuts

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