api

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URLTransformer

type URLTransformer struct {
	ExactPaths  []string
	RegexpPaths map[string]*regexp.Regexp
	// contains filtered or unexported fields
}

URLTransformer is useful for reading log files and converting actual request URls into pattners, such as those used in the OpenAPI Spec for reporting and categorization purposes.

func NewURLTransformer

func NewURLTransformer() URLTransformer

NewURLTransformer creates a new URLTransformer instance.

func (*URLTransformer) BuildReverseEndpointPattern

func (ut *URLTransformer) BuildReverseEndpointPattern(method, actualURL string) string

func (*URLTransformer) LoadPath

func (ut *URLTransformer) LoadPath(path string) error

LoadPath loads a single spec URL pattern.

func (*URLTransformer) LoadPaths

func (ut *URLTransformer) LoadPaths(paths []string) error

LoadPaths loads multiple spec URL patterns. See the test file for an example.

func (*URLTransformer) URLActualToPattern

func (ut *URLTransformer) URLActualToPattern(s string) string

URLActualToPattern is the "runtime" API that is called over and over for URL classification purposes.

Jump to

Keyboard shortcuts

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