comparer

package
v1.3.7-beta5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exports = map[string]interface{}{
	"CompareRaw":          CompareHTTPResponseRaw,
	"CompareHTTPResponse": CompareHTTPResponse,
	"NewDiscriminator":    NewDiscriminator,
}

Functions

func CompareHTTPResponse

func CompareHTTPResponse(rsp1 *http.Response, rsp2 *http.Response) float64

func CompareHTTPResponseRaw

func CompareHTTPResponseRaw(rsp1 []byte, rsp2 []byte) float64

func CompareHtml

func CompareHtml(s1, s2 []byte) (f float64)

func CompareJsons

func CompareJsons(s1, s2 []byte) float64

Types

type Config

type Config struct {
	BodyLimit int // default 1024
}

type CookieSortable

type CookieSortable []*http.Cookie

func (CookieSortable) Len

func (a CookieSortable) Len() int

func (CookieSortable) Less

func (a CookieSortable) Less(i, j int) bool

func (CookieSortable) Swap

func (a CookieSortable) Swap(i, j int)

type Discriminator

type Discriminator struct {
	PositiveSample           []byte
	PositiveThresholdAverage float64

	NegativeSample           []byte
	NegativeThresholdAverage float64
}

func NewDiscriminator

func NewDiscriminator(origin []byte) *Discriminator

func (*Discriminator) AdjustNegativeThreshold

func (d *Discriminator) AdjustNegativeThreshold(raw []byte) error

func (*Discriminator) AdjustPositiveThreshold

func (d *Discriminator) AdjustPositiveThreshold(raw []byte) error

func (*Discriminator) IsNegative

func (d *Discriminator) IsNegative(raw []byte) bool

func (*Discriminator) IsNegativeWithThreshold

func (d *Discriminator) IsNegativeWithThreshold(raw []byte, threshold float64) bool

func (*Discriminator) IsPositive

func (d *Discriminator) IsPositive(raw []byte) bool

func (*Discriminator) IsPositiveWithThreshold

func (d *Discriminator) IsPositiveWithThreshold(raw []byte, threshold float64) bool

func (*Discriminator) SetNegativeSample

func (d *Discriminator) SetNegativeSample(raw []byte)

type MapItemSortable

type MapItemSortable []*mapIterItem

func (MapItemSortable) Len

func (a MapItemSortable) Len() int

func (MapItemSortable) Less

func (a MapItemSortable) Less(i, j int) bool

func (MapItemSortable) Swap

func (a MapItemSortable) Swap(i, j int)

type ReflectValueSortable

type ReflectValueSortable []reflect.Value

func (ReflectValueSortable) Len

func (a ReflectValueSortable) Len() int

func (ReflectValueSortable) Less

func (a ReflectValueSortable) Less(i, j int) bool

func (ReflectValueSortable) Swap

func (a ReflectValueSortable) Swap(i, j int)

type Sortable

type Sortable []interface{}

func (Sortable) Len

func (a Sortable) Len() int

func (Sortable) Less

func (a Sortable) Less(i, j int) bool

func (Sortable) Swap

func (a Sortable) Swap(i, j int)

Jump to

Keyboard shortcuts

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