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.
Click to show internal directories.
Click to hide internal directories.