Documentation ¶
Index ¶
Constants ¶
View Source
const ( BeginRoutePrefix = "// route:begin: " EndRoutePrefix = "// route:end: " )
Variables ¶
View Source
var DefaultRouteNameConverter = NewDividerNameConverter("::", 0)
DefaultRouteNameConverter is the default route name Converter.
View Source
var DefaultSingleRouteTemplatePath = path.Join(gutil.SourcePath(), "default_template.tpl")
Functions ¶
func OpenApiPathFromEchoPath ¶
OpenApiPathFromEchoPath convert echo path to openapi path. e.g, a/:id/:code => a/{id}/{code}
func SortEchoRoutesByName ¶
func SortEchoRoutesByName(routes []*echo.Route) []*echo.Route
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
func NewExtractor ¶
func NewExtractor(o ExtractorOptions) *Extractor
type ExtractorOptions ¶
type ExtractorOptions struct { Echo *echo.Echo ExtractDestinationPath string // Destination path of extract filePath SingleRouteTemplatePath string Converter RouteNameConverter }
type PathParam ¶
func PathParams ¶
type RouteNameConverter ¶
type RouteNameConverter interface { Tags(name string) []string // give tags from route name CamelCase(name string) string }
func NewDividerNameConverter ¶
func NewDividerNameConverter(div string, maxTag int) RouteNameConverter
type Trimmer ¶
type Trimmer struct {
// contains filtered or unexported fields
}
func NewTrimmer ¶
func NewTrimmer(o TrimmerOptions) *Trimmer
type TrimmerOptions ¶
type TrimmerOptions struct { Echo *echo.Echo ExtractDestinationPath string }
Click to show internal directories.
Click to hide internal directories.