Documentation ¶
Index ¶
- type Document
- type Entries
- func (e Entries) GroupBy(fn func(Entry) string) GroupedEntries
- func (e Entries) Method() *String
- func (e Entries) Params() *Map
- func (e Entries) ReqBody() *String
- func (e Entries) ReqHeaders() *Map
- func (e Entries) RespBody() *String
- func (e Entries) RespHeaders() *Map
- func (e Entries) Status() *Status
- func (e Entries) URL() *URL
- type Entry
- type GroupedEntries
- type HostPath
- type HostPathScore
- type Map
- type Score
- type ScorePromoted
- type Status
- type StatusScore
- type String
- type StringScore
- type Strings
- type URL
- type Value
- type ValuePromoted
- type ValueScore
- type Values
- type ValuesPromoted
- type ValuesScore
- type ValuesScores
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Method *String Status *Status URL *URL Params *Map ReqHeaders *Map ReqBody *String RespHeaders *Map RespBody *String }
Document defines a struct of all the possible things that a http request could encounter.
type Entries ¶
type Entries []Entry
Entries is a type alias for a slice of Entry
func (Entries) GroupBy ¶
func (e Entries) GroupBy(fn func(Entry) string) GroupedEntries
GroupBy defines a way to group entires by a particular key
func (Entries) ReqHeaders ¶
ReqHeaders returns a Map of all possible http request headers
func (Entries) RespHeaders ¶
RespHeaders returns a Map of all possible http response headers
type Entry ¶
type Entry struct { URL *url.URL Method string Status int ReqHeaders http.Header ReqBody func() []byte RespHeaders http.Header RespBody func() []byte }
Entry defines a raw http request.
func (Entry) NormalisePath ¶
NormalisePath attempts to normalise both a Host and Path in a sane way
type GroupedEntries ¶
GroupedEntries allows the grouping of all entries for a specific key
type HostPath ¶
type HostPath struct {
Host, Path string
}
HostPath is a tuple of both the Host and the Path
type HostPathScore ¶
HostPathScore is a tuple of both the HostPath and a Score for sorting
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map defines a structure of values with associated scores and a threshold score, which states what should be worked upon.
func (*Map) Difference ¶
func (p *Map) Difference() []ValuesScore
Difference returns a slice of ValuesScore that are not common.
func (*Map) Union ¶
func (p *Map) Union() ValuesScore
Union returns the common ValuesScore of the map.
type ScorePromoted ¶
ScorePromoted defines a score that can be promoted
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) Difference ¶
func (m *Status) Difference() []StatusScore
func (*Status) Union ¶
func (m *Status) Union() StatusScore
type StatusScore ¶
type String ¶
type String struct {
// contains filtered or unexported fields
}
String holds a series of string values with associated scores
func (*String) Difference ¶
func (m *String) Difference() []StringScore
Difference returns a slice of StringScores that doesn't equal the Union.
type StringScore ¶
StringScore is a tuple containing a string and a score
type Strings ¶
type Strings []string
Strings is a type alias for a slice of strings
type URL ¶
type URL struct {
// contains filtered or unexported fields
}
URL holds various HostPath and scores, along with the total number of urls
func (*URL) Difference ¶
func (u *URL) Difference() []HostPathScore
Difference returns all the HostPathScore's that aren't the most common.
type ValuePromoted ¶
ValuePromoted defines a value that can be promoted
type ValueScore ¶
ValueScore is a tuple of a Value and a Score
type ValuesPromoted ¶
type ValuesPromoted map[string]ValuePromoted
ValuesPromoted is a type alias for a map with key as a string and value as a ValuePromoted
type ValuesScore ¶
ValuesScore is a tuple of a series of Values and Score
type ValuesScores ¶
type ValuesScores []ValuesScore
ValuesScores is a type alias for sorting a slice of ValuesScore
func (ValuesScores) Len ¶
func (v ValuesScores) Len() int
func (ValuesScores) Less ¶
func (v ValuesScores) Less(i, j int) bool
func (ValuesScores) Swap ¶
func (v ValuesScores) Swap(i, j int)