Documentation ¶
Index ¶
- Constants
- func ParseOperationType(input, def string) string
- type Operation
- type Operations
- func (ops Operations) CountsByClass() map[string]int
- func (ops Operations) CountsByTag(concatenate bool, sep string) map[string]int
- func (ops Operations) CountsByTagCount() map[int]int
- func (ops Operations) CountsByType() (operationCounts map[string]int, methodCounts map[string]int)
- func (ops Operations) DuplicatePaths() map[string]int
- func (ops Operations) PathsByClass() maputil.MapStringSlice
- func (ops Operations) RemovePaths(paths []string) Operations
- func (ops Operations) Table() ([]string, [][]string)
- func (ops Operations) TrimSpace(sortTags bool)
- type URLTransformer
Constants ¶
View Source
const ( TypeAPI = "api" TypeMethod = "method" TypeCallbackMethod = "callback" TypeEvent = "event" TypeEventAliasWebhook = "webhook" TypeCategory = "category" // mobile TypeClass = "class" // mobile TypeConstant = "constant" // mobile TypeProtocol = "protocol" // mobile MethodClass = "class" MethodInstance = "instance" )
Variables ¶
This section is empty.
Functions ¶
func ParseOperationType ¶
Types ¶
type Operation ¶
type Operations ¶
type Operations []Operation
func (Operations) CountsByClass ¶ added in v0.37.7
func (ops Operations) CountsByClass() map[string]int
func (Operations) CountsByTag ¶ added in v0.34.3
func (ops Operations) CountsByTag(concatenate bool, sep string) map[string]int
func (Operations) CountsByTagCount ¶ added in v0.34.3
func (ops Operations) CountsByTagCount() map[int]int
func (Operations) CountsByType ¶ added in v0.34.3
func (ops Operations) CountsByType() (operationCounts map[string]int, methodCounts map[string]int)
func (Operations) DuplicatePaths ¶ added in v0.34.1
func (ops Operations) DuplicatePaths() map[string]int
func (Operations) PathsByClass ¶ added in v0.37.13
func (ops Operations) PathsByClass() maputil.MapStringSlice
func (Operations) RemovePaths ¶ added in v0.34.0
func (ops Operations) RemovePaths(paths []string) Operations
func (Operations) Table ¶
func (ops Operations) Table() ([]string, [][]string)
func (Operations) TrimSpace ¶ added in v0.34.0
func (ops Operations) TrimSpace(sortTags bool)
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.