utils

package
v1.23.10 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractParamsFromPath

func ExtractParamsFromPath(path string) []astra.Param

ExtractParamsFromPath extracts the parameters from a path.

func MapPathParams

func MapPathParams(path string, repl func(string) string) string

MapPathParams maps the path parameters to a new path. Useful when converting a Gin path to an OpenAPI path.

Types

type HandlerPath

type HandlerPath struct {
	PathParts    []string
	HandlerParts []string
}

func SplitHandlerPath

func SplitHandlerPath(handlerPath string) HandlerPath

func (HandlerPath) FuncName

func (h HandlerPath) FuncName() string

func (HandlerPath) Handler

func (h HandlerPath) Handler() string

func (HandlerPath) PackageName

func (h HandlerPath) PackageName() string

func (HandlerPath) PackagePath

func (h HandlerPath) PackagePath() string

Jump to

Keyboard shortcuts

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