utils

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 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 added in v1.18.0

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

func SplitHandlerPath added in v1.18.0

func SplitHandlerPath(handlerPath string) HandlerPath

func (HandlerPath) FuncName added in v1.18.0

func (h HandlerPath) FuncName() string

func (HandlerPath) Handler added in v1.18.0

func (h HandlerPath) Handler() string

func (HandlerPath) PackageName added in v1.18.0

func (h HandlerPath) PackageName() string

func (HandlerPath) PackagePath added in v1.18.0

func (h HandlerPath) PackagePath() string

Jump to

Keyboard shortcuts

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