Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeAPI = "api" TypeMethod = "method" TypeCallbackMethod = "callback" TypeEvent = "event" TypeEventAliasWebhook = "webhook" MethodClass = "class" MethodInstance = "instance" )
Variables ¶
This section is empty.
Functions ¶
func ParseOperationType ¶ added in v0.28.0
Types ¶
type Operation ¶ added in v0.28.0
type Operations ¶ added in v0.28.0
type Operations []Operation
func (Operations) Table ¶ added in v0.28.0
func (ops Operations) Table() ([]string, [][]string)
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.