├── core ├── testing2.db.lock ├── matching │ ├── matchers │ │ ├── exact_match.go │ │ ├── negation_match.go │ │ ├── glob_match.go │ │ ├── test.json │ │ ├── regex_match.go │ │ ├── xpath_match.go │ │ ├── json_path_match.go │ │ └── xml_match.go │ └── state_matcher.go ├── handlers │ └── v2 │ │ ├── template_datasource_views.go │ │ └── postserveactiondetails_views.go ├── cache │ ├── fastcache.go │ └── cache.go ├── models │ └── cached_response.go └── util │ └── hashset.go ├── .tool-versions ├── docs ├── .gitignore ├── pages │ ├── tutorials │ │ ├── advanced │ │ │ ├── proxyauth │ │ │ │ ├── login-hoverctl.sh │ │ │ │ ├── hoverfly-start-proxy-auth.sh │ │ │ │ ├── login-hoverctl-new-target.sh │ │ │ │ ├── curl-proxy-basic-auth.sh │ │ │ │ └── config.yml │ │ │ ├── configuressl │ │ │ │ ├── hoverfly-generate-ca.sh │ │ │ │ ├── hoverctl-start-with-custom-cert.sh │ │ │ │ └── hoverfly-generate-ca-custom-name.sh │ │ │ ├── remotehoverfly │ │ │ │ ├── run-hoverfly-remote-host.sh │ │ │ │ ├── default-hoverctl-target.sh │ │ │ │ ├── create-hoverctl-target.sh │ │ │ │ └── curl-proxy-remote-hoverfly.sh │ │ │ └── advanced.rst │ │ ├── basic │ │ │ ├── loosematching │ │ │ │ ├── simulation.json │ │ │ │ ├── simulationimport.json │ │ │ │ ├── loosematching.sh │ │ │ │ └── loosematchingimport.sh │ │ │ ├── exportingsimulations │ │ │ │ └── exportingsimulations.mermaid.png │ │ │ ├── specificurls │ │ │ │ ├── filter-dest-dry-run.sh │ │ │ │ ├── filter-dest-dry-run-regex.sh │ │ │ │ └── filter-dest.sh │ │ │ ├── delays │ │ │ │ ├── allresponses │ │ │ │ │ ├── delays-simulate.sh │ │ │ │ │ └── delays-capture.sh │ │ │ │ ├── multiplehosts │ │ │ │ │ ├── delays-simulate.sh │ │ │ │ │ └── delays-capture.sh │ │ │ │ ├── httpmethods │ │ │ │ │ ├── delays-simulate.sh │ │ │ │ │ └── delays-capture.sh │ │ │ │ ├── lognormal │ │ │ │ │ ├── delays-simulate.sh │ │ │ │ │ └── delays-capture.sh │ │ │ │ └── multiplelocations │ │ │ │ │ ├── delays-capture.sh │ │ │ │ │ └── delays-simulate.sh │ │ │ ├── randomlatency │ │ │ │ └── modify.sh │ │ │ ├── modifyingresponses │ │ │ │ └── modify.sh │ │ │ ├── asawebserver │ │ │ │ └── asawebserver.sh │ │ │ └── basic.rst │ │ └── tutorials.rst │ ├── keyconcepts │ │ ├── webserver.mermaid.png │ │ ├── middleware.mermaid.png │ │ ├── proxyserver.mermaid.png │ │ ├── modes │ │ │ ├── capture.mermaid.png │ │ │ ├── modify.mermaid.png │ │ │ ├── simulate.mermaid.png │ │ │ ├── synthesize.mermaid.png │ │ │ ├── spy.rst │ │ │ ├── modes.rst │ │ │ └── simulate.rst │ │ ├── proxyconfigs.mermaid.png │ │ ├── state │ │ │ ├── state.rst │ │ │ └── managingstate.rst │ │ └── simulations │ │ │ └── meta.rst │ ├── simulations │ │ ├── basic-simulation.rst │ │ ├── all-matchers-simulation.rst │ │ ├── basic-delay-simulation.rst │ │ ├── basic-encoded-simulation.rst │ │ ├── get-method-delay-simulation.rst │ │ ├── log-normal-delay-simulation.rst │ │ ├── multiple-hosts-delay-simulation.rst │ │ └── multiple-locations-delay-simulation.rst │ ├── introduction │ │ └── introduction.rst │ ├── reference │ │ ├── simulationschema.rst │ │ ├── hoverfly │ │ │ └── hoverflycommands.rst │ │ └── reference.rst │ ├── bindings │ │ ├── bindings.rst │ │ └── java.rst │ └── community.rst ├── _static │ └── logo-large.png ├── mermaid │ ├── simulations.mermaid │ ├── webserver.mermaid │ ├── proxyserver.mermaid │ ├── proxyconfigs.mermaid │ ├── middleware.mermaid │ ├── simulate.mermaid │ ├── capture.mermaid │ ├── synthesize.mermaid │ ├── modify.mermaid │ └── exportingsimulations.mermaid ├── README.md └── requirements.txt ├── functional-tests ├── core │ ├── bin │ │ └── .gitkeep │ ├── testdata │ │ ├── 1x1.png │ │ ├── test-student-data.csv │ │ └── 16x16_square.png │ └── api │ │ └── suite_test.go └── hoverctl │ ├── bin │ └── .gitkeep │ ├── .hoverfly │ ├── .gitkeep │ └── cache │ │ └── .gitkeep │ ├── testdata │ ├── test-student-data1.csv │ ├── test-student-data.csv │ ├── delays.json │ ├── request-template.json │ └── test.pac │ └── sandbox-1769533177 │ └── testdata │ └── test-student-data.csv ├── .gitattributes ├── vendor ├── gonum.org │ └── v1 │ │ └── gonum │ │ ├── lapack │ │ ├── .gitignore │ │ ├── doc.go │ │ └── gonum │ │ │ └── dlapy2.go │ │ ├── mathext │ │ ├── internal │ │ │ ├── amos │ │ │ │ ├── staticcheck.conf │ │ │ │ └── doc.go │ │ │ ├── cephes │ │ │ │ ├── staticcheck.conf │ │ │ │ └── doc.go │ │ │ └── gonum │ │ │ │ ├── gonum.go │ │ │ │ └── doc.go │ │ ├── doc.go │ │ └── README.md │ │ ├── internal │ │ ├── asm │ │ │ ├── c64 │ │ │ │ ├── conj.go │ │ │ │ └── doc.go │ │ │ ├── f32 │ │ │ │ ├── doc.go │ │ │ │ └── ge_amd64.go │ │ │ ├── f64 │ │ │ │ └── doc.go │ │ │ └── c128 │ │ │ │ └── doc.go │ │ ├── math32 │ │ │ ├── doc.go │ │ │ ├── signbit.go │ │ │ ├── sqrt_amd64.s │ │ │ └── sqrt_arm64.s │ │ └── cmplx64 │ │ │ ├── doc.go │ │ │ ├── conj.go │ │ │ └── abs.go │ │ ├── stat │ │ ├── doc.go │ │ ├── distuv │ │ │ └── doc.go │ │ ├── README.md │ │ └── combin │ │ │ └── doc.go │ │ ├── mat │ │ ├── README.md │ │ └── consts.go │ │ ├── blas │ │ ├── blas64 │ │ │ └── doc.go │ │ └── cblas128 │ │ │ └── doc.go │ │ └── floats │ │ ├── scalar │ │ └── doc.go │ │ ├── README.md │ │ └── doc.go ├── github.com │ ├── brianvoe │ │ └── gofakeit │ │ │ └── v6 │ │ │ ├── .gitignore │ │ │ ├── CONTRIBUTING.md │ │ │ ├── logo.png │ │ │ ├── doc.go │ │ │ ├── data │ │ │ ├── html.go │ │ │ ├── log_level.go │ │ │ ├── computer.go │ │ │ └── README.md │ │ │ └── slice.go │ ├── go-zoo │ │ └── bone │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ └── CONTRIBUTING.md │ ├── phayes │ │ └── freeport │ │ │ └── .gitignore │ ├── SpectoLabs │ │ ├── raymond │ │ │ ├── VERSION │ │ │ ├── .gitignore │ │ │ ├── .gitmodules │ │ │ ├── raymond.png │ │ │ └── .travis.yml │ │ ├── goproxy │ │ │ ├── .gitignore │ │ │ ├── logger.go │ │ │ └── all.bash │ │ └── goxml2json │ │ │ ├── doc.go │ │ │ ├── .gitignore │ │ │ └── converter.go │ ├── antonholmquist │ │ └── jason │ │ │ ├── .gitignore │ │ │ └── .travis.yml │ ├── spf13 │ │ ├── pflag │ │ │ ├── .gitignore │ │ │ ├── .golangci.yaml │ │ │ ├── .editorconfig │ │ │ └── .travis.yml │ │ ├── cobra │ │ │ ├── .mailmap │ │ │ ├── MAINTAINERS │ │ │ └── .gitignore │ │ ├── viper │ │ │ ├── .travis.yml │ │ │ └── .gitignore │ │ ├── cast │ │ │ └── .gitignore │ │ └── jwalterweatherman │ │ │ └── .gitignore │ ├── corpix │ │ └── uarand │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ └── shell.nix │ ├── clipperhouse │ │ ├── displaywidth │ │ │ ├── .gitignore │ │ │ └── gen.go │ │ └── stringish │ │ │ ├── .gitignore │ │ │ └── interface.go │ ├── codegangsta │ │ └── negroni │ │ │ ├── .gitignore │ │ │ ├── response_writer_pusher.go │ │ │ └── .travis.yml │ ├── gorilla │ │ ├── mux │ │ │ ├── .gitignore │ │ │ └── .editorconfig │ │ └── websocket │ │ │ ├── AUTHORS │ │ │ ├── .gitignore │ │ │ └── mask_safe.go │ ├── nxadm │ │ └── tail │ │ │ ├── .gitignore │ │ │ ├── ratelimiter │ │ │ └── storage.go │ │ │ ├── .cirrus.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── tail_posix.go │ │ │ ├── Dockerfile │ │ │ └── tail_windows.go │ ├── olekukonko │ │ ├── cat │ │ │ └── .gitignore │ │ ├── ll │ │ │ └── .gitignore │ │ ├── errors │ │ │ └── .gitignore │ │ └── tablewriter │ │ │ ├── .gitignore │ │ │ └── pkg │ │ │ └── twcache │ │ │ └── cache.go │ ├── BurntSushi │ │ └── toml │ │ │ ├── .gitignore │ │ │ └── doc.go │ ├── boltdb │ │ └── bolt │ │ │ ├── .gitignore │ │ │ ├── boltsync_unix.go │ │ │ ├── bolt_linux.go │ │ │ ├── bolt_ppc.go │ │ │ ├── bolt_386.go │ │ │ ├── bolt_amd64.go │ │ │ ├── appveyor.yml │ │ │ ├── bolt_arm64.go │ │ │ ├── bolt_ppc64.go │ │ │ ├── bolt_ppc64le.go │ │ │ ├── bolt_s390x.go │ │ │ ├── Makefile │ │ │ └── bolt_openbsd.go │ ├── pborman │ │ └── uuid │ │ │ ├── CONTRIBUTORS │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ └── doc.go │ ├── sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── terminal_check_js.go │ │ │ ├── terminal_check_appengine.go │ │ │ ├── terminal_check_no_terminal.go │ │ │ ├── terminal_check_solaris.go │ │ │ ├── terminal_check_unix.go │ │ │ ├── appveyor.yml │ │ │ ├── terminal_check_bsd.go │ │ │ ├── terminal_check_notappengine.go │ │ │ ├── .travis.yml │ │ │ └── terminal_check_windows.go │ ├── golang-jwt │ │ └── jwt │ │ │ └── v4 │ │ │ ├── .gitignore │ │ │ ├── staticcheck.conf │ │ │ └── doc.go │ ├── xeipuuv │ │ ├── gojsonschema │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ └── glide.yaml │ │ └── gojsonreference │ │ │ └── README.md │ ├── gabriel-vasile │ │ └── mimetype │ │ │ ├── .gitattributes │ │ │ ├── .golangci.yml │ │ │ └── .git-blame-ignore-revs │ ├── tdewolff │ │ ├── parse │ │ │ └── v2 │ │ │ │ ├── .gitattributes │ │ │ │ ├── .gitignore │ │ │ │ └── .golangci.yml │ │ └── minify │ │ │ └── v2 │ │ │ ├── .gitattributes │ │ │ ├── .golangci.yml │ │ │ ├── xml │ │ │ └── table.go │ │ │ └── Dockerfile │ ├── mattn │ │ ├── go-isatty │ │ │ ├── doc.go │ │ │ ├── go.test.sh │ │ │ ├── isatty_others.go │ │ │ ├── isatty_tcgets.go │ │ │ ├── isatty_plan9.go │ │ │ └── isatty_bsd.go │ │ ├── go-runewidth │ │ │ ├── runewidth_appengine.go │ │ │ └── runewidth_js.go │ │ └── go-colorable │ │ │ └── go.test.sh │ ├── onsi │ │ ├── gomega │ │ │ ├── .gitignore │ │ │ └── matchers │ │ │ │ ├── support │ │ │ │ └── goraph │ │ │ │ │ ├── node │ │ │ │ │ └── node.go │ │ │ │ │ └── util │ │ │ │ │ └── util.go │ │ │ │ ├── attributes_slice.go │ │ │ │ └── be_nil_matcher.go │ │ └── ginkgo │ │ │ ├── .gitignore │ │ │ ├── reporters │ │ │ ├── stenographer │ │ │ │ └── support │ │ │ │ │ ├── go-isatty │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── isatty_appengine.go │ │ │ │ │ ├── isatty_linux.go │ │ │ │ │ ├── isatty_solaris.go │ │ │ │ │ ├── isatty_bsd.go │ │ │ │ │ ├── isatty_windows.go │ │ │ │ │ └── README.md │ │ │ │ │ └── go-colorable │ │ │ │ │ └── colorable_others.go │ │ │ └── reporter.go │ │ │ ├── internal │ │ │ ├── specrunner │ │ │ │ └── random_id.go │ │ │ ├── remote │ │ │ │ └── output_interceptor.go │ │ │ ├── leafnodes │ │ │ │ └── interfaces.go │ │ │ ├── global │ │ │ │ └── init.go │ │ │ └── spec_iterator │ │ │ │ └── spec_iterator.go │ │ │ └── types │ │ │ ├── code_location.go │ │ │ └── synchronization.go │ ├── jackwakefield │ │ └── gopac │ │ │ ├── .travis.yml │ │ │ ├── Makefile │ │ │ ├── CONTRIBUTORS.md │ │ │ └── .gitignore │ ├── ryanuber │ │ └── go-glob │ │ │ └── .travis.yml │ ├── fsnotify │ │ └── fsnotify │ │ │ ├── internal │ │ │ ├── internal.go │ │ │ └── unix2.go │ │ │ ├── staticcheck.conf │ │ │ ├── .mailmap │ │ │ ├── .gitignore │ │ │ ├── system_bsd.go │ │ │ ├── system_darwin.go │ │ │ └── .cirrus.yml │ ├── magiconair │ │ └── properties │ │ │ └── .gitignore │ ├── robertkrimen │ │ └── otto │ │ │ ├── DESIGN.markdown │ │ │ ├── token │ │ │ └── generate.go │ │ │ ├── locale.go │ │ │ ├── type_number.go │ │ │ ├── generate.go │ │ │ ├── type_boolean.go │ │ │ ├── .gitignore │ │ │ ├── cmpl.go │ │ │ ├── dbg.go │ │ │ ├── .clog.toml │ │ │ ├── scope.go │ │ │ ├── value_primitive.go │ │ │ └── result.go │ ├── go-playground │ │ ├── locales │ │ │ ├── logo.png │ │ │ ├── .gitignore │ │ │ └── .travis.yml │ │ ├── validator │ │ │ └── v10 │ │ │ │ ├── logo.png │ │ │ │ ├── translations.go │ │ │ │ ├── Makefile │ │ │ │ ├── .gitignore │ │ │ │ └── MAINTAINERS.md │ │ └── universal-translator │ │ │ ├── logo.png │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ └── .travis.yml │ ├── hashicorp │ │ ├── hcl │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── Makefile │ │ │ ├── hcl │ │ │ │ └── parser │ │ │ │ │ └── error.go │ │ │ ├── appveyor.yml │ │ │ ├── hcl.go │ │ │ └── lex.go │ │ └── golang-lru │ │ │ ├── testing.go │ │ │ ├── README.md │ │ │ ├── .gitignore │ │ │ └── .golangci.yml │ ├── ChrisTrenkamp │ │ └── xsel │ │ │ └── grammar │ │ │ └── README.md │ ├── rcrowley │ │ └── go-metrics │ │ │ ├── runtime_no_cgo.go │ │ │ ├── .gitignore │ │ │ ├── runtime_cgo.go │ │ │ ├── runtime_no_gccpufraction.go │ │ │ ├── runtime_gccpufraction.go │ │ │ ├── validate.sh │ │ │ ├── .travis.yml │ │ │ └── metrics.go │ ├── leodido │ │ └── go-urn │ │ │ ├── kind.go │ │ │ ├── .gitignore │ │ │ ├── options.go │ │ │ ├── parsing_mode.go │ │ │ ├── scim │ │ │ └── schema │ │ │ │ └── type.go │ │ │ └── urn8141.go │ ├── google │ │ ├── uuid │ │ │ ├── CONTRIBUTORS │ │ │ ├── doc.go │ │ │ └── node_js.go │ │ └── go-cmp │ │ │ └── cmp │ │ │ └── internal │ │ │ ├── flags │ │ │ └── flags.go │ │ │ └── diff │ │ │ └── debug_disable.go │ ├── kardianos │ │ └── osext │ │ │ ├── osext_go18.go │ │ │ └── osext_plan9.go │ ├── pkg │ │ └── errors │ │ │ ├── .travis.yml │ │ │ └── .gitignore │ ├── dsnet │ │ └── compress │ │ │ ├── brotli │ │ │ ├── dict_encoder.go │ │ │ └── prefix_encoder.go │ │ │ └── internal │ │ │ ├── gofuzz.go │ │ │ └── debug.go │ ├── dghubble │ │ └── sling │ │ │ └── Makefile │ ├── icrowley │ │ └── fake │ │ │ ├── currencies.go │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── nix-cage.json │ │ │ ├── personal.go │ │ │ └── jobs.go │ ├── beevik │ │ └── etree │ │ │ └── CONTRIBUTORS │ ├── inconshreveable │ │ └── mousetrap │ │ │ └── trap_others.go │ └── fatih │ │ └── color │ │ └── color_windows.go ├── golang.org │ └── x │ │ ├── sys │ │ ├── unix │ │ │ ├── .gitignore │ │ │ ├── ptrace_ios.go │ │ │ ├── vgetrandom_unsupported.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── endian_big.go │ │ │ ├── ptrace_darwin.go │ │ │ ├── constants.go │ │ │ ├── endian_little.go │ │ │ ├── mmap_nomremap.go │ │ │ ├── vgetrandom_linux.go │ │ │ ├── auxv_unsupported.go │ │ │ ├── aliases.go │ │ │ ├── readdirent_getdents.go │ │ │ ├── pagesize_unix.go │ │ │ ├── sysvshm_unix_other.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── syscall_linux_gc_arm.go │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── syscall_linux_alarm.go │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── syscall_hurd_386.go │ │ │ ├── sysvshm_linux.go │ │ │ ├── sockcmsg_dragonfly.go │ │ │ ├── race0.go │ │ │ └── syscall_linux_gc_386.go │ │ ├── plan9 │ │ │ ├── asm.s │ │ │ ├── pwd_plan9.go │ │ │ ├── race0.go │ │ │ ├── mksysnum_plan9.sh │ │ │ └── str.go │ │ ├── cpu │ │ │ ├── cpu_other_arm.go │ │ │ ├── cpu_zos.go │ │ │ ├── cpu_other_arm64.go │ │ │ ├── cpu_mipsx.go │ │ │ ├── cpu_other_riscv64.go │ │ │ ├── cpu_other_mips64x.go │ │ │ ├── cpu_gc_arm64.go │ │ │ ├── cpu_other_ppc64x.go │ │ │ ├── cpu_gccgo_arm64.go │ │ │ ├── cpu_linux_noinit.go │ │ │ ├── cpu_other_x86.go │ │ │ ├── cpu_linux.go │ │ │ ├── cpu_mips64x.go │ │ │ ├── cpu_loong64.s │ │ │ ├── cpu_openbsd_arm64.s │ │ │ ├── cpu_ppc64x.go │ │ │ ├── endian_big.go │ │ │ ├── runtime_auxv_go121.go │ │ │ ├── runtime_auxv.go │ │ │ ├── endian_little.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── cpu_wasm.go │ │ │ ├── cpu_gc_x86.go │ │ │ └── cpu_linux_mips64x.go │ │ └── windows │ │ │ ├── aliases.go │ │ │ ├── mksyscall.go │ │ │ ├── race0.go │ │ │ └── str.go │ │ ├── term │ │ ├── codereview.cfg │ │ ├── term_unix_other.go │ │ ├── term_unix_bsd.go │ │ └── README.md │ │ └── text │ │ ├── encoding │ │ ├── japanese │ │ │ └── all.go │ │ └── simplifiedchinese │ │ │ └── all.go │ │ ├── internal │ │ └── language │ │ │ └── common.go │ │ └── message │ │ └── catalog │ │ ├── go19.go │ │ └── gopre19.go ├── gopkg.in │ ├── sourcemap.v1 │ │ ├── Makefile │ │ └── .travis.yml │ ├── tomb.v1 │ │ └── README.md │ └── yaml.v2 │ │ ├── .travis.yml │ │ └── NOTICE └── go.yaml.in │ └── yaml │ └── v3 │ └── NOTICE ├── examples ├── clients │ └── readthedocs_query │ │ ├── requirements.txt │ │ └── README.md ├── readme.md ├── simulations │ └── README.md ├── middleware │ ├── modify_response │ │ ├── modify_response.js │ │ ├── modify_response.rb │ │ └── modify_response.py │ ├── README.md │ └── aws_lambda │ │ └── aws_lambda.py └── postserveaction │ └── simulation-with-callback.json ├── hoverfly_logo.png ├── hoverctl ├── main.go └── wrapper │ ├── cache.go │ ├── pac.go │ └── wrapper_test.go └── .github └── ISSUE_TEMPLATE └── question-about-Hoverfly.md /core/testing2.db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | golang 1.16 2 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | *.oplx 3 | -------------------------------------------------------------------------------- /functional-tests/core/bin/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /functional-tests/hoverctl/bin/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | examples/* linguist-vendored -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /functional-tests/hoverctl/.hoverfly/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /functional-tests/hoverctl/.hoverfly/cache/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/go-zoo/bone/.gitignore: -------------------------------------------------------------------------------- 1 | tags 2 | -------------------------------------------------------------------------------- /vendor/github.com/phayes/freeport/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/raymond/VERSION: -------------------------------------------------------------------------------- 1 | 2.0.2 2 | -------------------------------------------------------------------------------- /vendor/github.com/antonholmquist/jason/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/raymond/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/corpix/uarand/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | *~ 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/clipperhouse/displaywidth/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/.gitignore: -------------------------------------------------------------------------------- 1 | /coverage.txt 2 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | examples/_* 3 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/cat/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .github 3 | lab -------------------------------------------------------------------------------- /vendor/golang.org/x/term/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/proxyauth/login-hoverctl.sh: -------------------------------------------------------------------------------- 1 | hoverctl login -------------------------------------------------------------------------------- /examples/clients/readthedocs_query/requirements.txt: -------------------------------------------------------------------------------- 1 | requests>=2.20.0 2 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | /toml.test 2 | /toml-test 3 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/goproxy/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | *.swp 3 | .idea/ 4 | -------------------------------------------------------------------------------- /vendor/github.com/clipperhouse/stringish/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/.gitignore: -------------------------------------------------------------------------------- 1 | *.prof 2 | *.test 3 | *.swp 4 | /bin/ 5 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Paul Borman 2 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | 4 | .idea/ 5 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/internal/amos/staticcheck.conf: -------------------------------------------------------------------------------- 1 | checks = [] 2 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/internal/cephes/staticcheck.conf: -------------------------------------------------------------------------------- 1 | checks = [] 2 | -------------------------------------------------------------------------------- /vendor/github.com/golang-jwt/jwt/v4/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | bin 3 | .idea/ 4 | 5 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/ll/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | lab 3 | tmp 4 | #_* 5 | _test/ 6 | -------------------------------------------------------------------------------- /vendor/github.com/xeipuuv/gojsonschema/.gitignore: -------------------------------------------------------------------------------- 1 | *.sw[nop] 2 | *.iml 3 | .vscode/ 4 | -------------------------------------------------------------------------------- /hoverfly_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/hoverfly_logo.png -------------------------------------------------------------------------------- /vendor/github.com/gabriel-vasile/mimetype/.gitattributes: -------------------------------------------------------------------------------- 1 | testdata/* linguist-vendored 2 | -------------------------------------------------------------------------------- /vendor/github.com/tdewolff/parse/v2/.gitattributes: -------------------------------------------------------------------------------- 1 | tests/*/corpus/* linguist-generated 2 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/configuressl/hoverfly-generate-ca.sh: -------------------------------------------------------------------------------- 1 | hoverfly -generate-ca-cert 2 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/proxyauth/hoverfly-start-proxy-auth.sh: -------------------------------------------------------------------------------- 1 | hoverctl start --auth 2 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/remotehoverfly/run-hoverfly-remote-host.sh: -------------------------------------------------------------------------------- 1 | hoverfly -ap 8880 -pp 8555 -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/remotehoverfly/default-hoverctl-target.sh: -------------------------------------------------------------------------------- 1 | hoverctl targets default remote -------------------------------------------------------------------------------- /functional-tests/hoverctl/testdata/test-student-data1.csv: -------------------------------------------------------------------------------- 1 | Id,Name,Marks 2 | 1,Test1,20 3 | *,NA,ABSENT -------------------------------------------------------------------------------- /docs/_static/logo-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/_static/logo-large.png -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | .idea/ 3 | tmp/ -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.test 3 | . 4 | .idea 5 | gomega.iml 6 | TODO 7 | .vscode -------------------------------------------------------------------------------- /vendor/gopkg.in/sourcemap.v1/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | go test ./... 3 | go test ./... -short -race 4 | go vet 5 | -------------------------------------------------------------------------------- /vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf: -------------------------------------------------------------------------------- 1 | checks = ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1023"] 2 | -------------------------------------------------------------------------------- /vendor/github.com/jackwakefield/gopac/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | install: make install_deps 3 | script: make test -------------------------------------------------------------------------------- /docs/mermaid/simulations.mermaid: -------------------------------------------------------------------------------- 1 | graph TB 2 | sim(Simulations)-->bolt(BoltDB) 3 | sim(Simulations)-->json(JSON) 4 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/goxml2json/doc.go: -------------------------------------------------------------------------------- 1 | // Package xml2json is an XML to JSON converter 2 | package xml2json 3 | -------------------------------------------------------------------------------- /vendor/github.com/clipperhouse/displaywidth/gen.go: -------------------------------------------------------------------------------- 1 | package displaywidth 2 | 3 | //go:generate go run -C internal/gen . 4 | -------------------------------------------------------------------------------- /vendor/github.com/corpix/uarand/.travis.yml: -------------------------------------------------------------------------------- 1 | language: nix 2 | 3 | script: nix-shell --pure --command "make lint test" 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-zoo/bone/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - tip 5 | 6 | script: 7 | - go test -v ./... 8 | -------------------------------------------------------------------------------- /vendor/github.com/ryanuber/go-glob/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | script: 5 | - go test -v ./... 6 | -------------------------------------------------------------------------------- /docs/mermaid/webserver.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | client -->> hoverfly: request 3 | hoverfly -->> client: response 4 | -------------------------------------------------------------------------------- /vendor/github.com/antonholmquist/jason/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.1 5 | - 1.2 6 | - 1.3 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/internal/internal.go: -------------------------------------------------------------------------------- 1 | // Package internal contains some helpers. 2 | package internal 3 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | TODO 3 | tmp/**/* 4 | *.coverprofile 5 | .vscode 6 | .idea/ 7 | *.log 8 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.golangci.yaml: -------------------------------------------------------------------------------- 1 | linters: 2 | disable-all: true 3 | enable: 4 | - nolintlint 5 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/configuressl/hoverctl-start-with-custom-cert.sh: -------------------------------------------------------------------------------- 1 | hoverctl start --certificate cert.pem --key key.pem 2 | -------------------------------------------------------------------------------- /functional-tests/core/testdata/1x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/functional-tests/core/testdata/1x1.png -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Make a pull request and submit it and ill take a look at it. Thanks! 2 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/staticcheck.conf: -------------------------------------------------------------------------------- 1 | checks = ['all', 2 | '-U1000', # Don't complain about unused functions. 3 | ] 4 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/.gitignore: -------------------------------------------------------------------------------- 1 | *.sublime-project 2 | *.sublime-workspace 3 | *.un~ 4 | *.swp 5 | .idea/ 6 | *.iml 7 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/DESIGN.markdown: -------------------------------------------------------------------------------- 1 | * Designate the filename of "anonymous" source code by the hash (md5/sha1, etc.) 2 | -------------------------------------------------------------------------------- /vendor/github.com/tdewolff/minify/v2/.gitattributes: -------------------------------------------------------------------------------- 1 | _benchmarks/sample_* linguist-generated 2 | tests/*/corpus/* linguist-generated 3 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/webserver.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/webserver.mermaid.png -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/raymond/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "mustache"] 2 | path = mustache 3 | url = git://github.com/mustache/spec.git 4 | -------------------------------------------------------------------------------- /vendor/github.com/clipperhouse/stringish/interface.go: -------------------------------------------------------------------------------- 1 | package stringish 2 | 3 | type Interface interface { 4 | ~[]byte | ~string 5 | } 6 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/middleware.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/middleware.mermaid.png -------------------------------------------------------------------------------- /docs/pages/keyconcepts/proxyserver.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/proxyserver.mermaid.png -------------------------------------------------------------------------------- /functional-tests/core/testdata/test-student-data.csv: -------------------------------------------------------------------------------- 1 | Id,Name,Marks 2 | 1,Test1,45 3 | 2,Test2,55 4 | 3,Test3,67 5 | 4,Test4,89 6 | *,NA,ABSENT 7 | -------------------------------------------------------------------------------- /functional-tests/hoverctl/testdata/test-student-data.csv: -------------------------------------------------------------------------------- 1 | Id,Name,Marks 2 | 1,Test1,45 3 | 2,Test2,55 4 | 3,Test3,67 5 | 4,Test4,89 6 | *,NA,ABSENT -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/token/generate.go: -------------------------------------------------------------------------------- 1 | package token 2 | 3 | //go:generate go run ../tools/gen-tokens -output token_const.go 4 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/modes/capture.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/modes/capture.mermaid.png -------------------------------------------------------------------------------- /docs/pages/keyconcepts/modes/modify.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/modes/modify.mermaid.png -------------------------------------------------------------------------------- /docs/pages/keyconcepts/modes/simulate.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/modes/simulate.mermaid.png -------------------------------------------------------------------------------- /docs/pages/keyconcepts/proxyconfigs.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/proxyconfigs.mermaid.png -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/loosematching/simulation.json: -------------------------------------------------------------------------------- 1 | "path": [ 2 | { 3 | "matcher": "exact", 4 | "value": "/foo/baz/bar/spam" 5 | } 6 | ] -------------------------------------------------------------------------------- /functional-tests/core/testdata/16x16_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/functional-tests/core/testdata/16x16_square.png -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/goproxy/logger.go: -------------------------------------------------------------------------------- 1 | package goproxy 2 | 3 | type Logger interface { 4 | Printf(format string, v ...interface{}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/raymond/raymond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/vendor/github.com/SpectoLabs/raymond/raymond.png -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/vendor/github.com/brianvoe/gofakeit/v6/logo.png -------------------------------------------------------------------------------- /vendor/github.com/gabriel-vasile/mimetype/.golangci.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | linters: 3 | exclusions: 4 | presets: 5 | - std-error-handling 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/vendor/github.com/go-playground/locales/logo.png -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/modes/synthesize.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/keyconcepts/modes/synthesize.mermaid.png -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/loosematching/simulationimport.json: -------------------------------------------------------------------------------- 1 | "path": [ 2 | { 3 | "matcher": "glob", 4 | "value": "/foo/*/bar/spam" 5 | } 6 | ] -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package gofakeit provides a set of functions that generate random data 3 | */ 4 | package gofakeit 5 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/vendor/github.com/go-playground/validator/v10/logo.png -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.gitignore: -------------------------------------------------------------------------------- 1 | y.output 2 | 3 | # ignore intellij files 4 | .idea 5 | *.iml 6 | *.ipr 7 | *.iws 8 | 9 | *.test 10 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | func isTerminal(fd int) bool { 6 | return false 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/tdewolff/parse/v2/.gitignore: -------------------------------------------------------------------------------- 1 | tests/*/fuzz-fuzz.zip 2 | tests/*/crashers 3 | tests/*/suppressions 4 | tests/*/corpus/* 5 | !tests/*/corpus/*.* 6 | -------------------------------------------------------------------------------- /functional-tests/hoverctl/sandbox-1769533177/testdata/test-student-data.csv: -------------------------------------------------------------------------------- 1 | Id,Name,Marks 2 | 1,Test1,45 3 | 2,Test2,55 4 | 3,Test3,67 5 | 4,Test4,89 6 | *,NA,ABSENT -------------------------------------------------------------------------------- /vendor/github.com/ChrisTrenkamp/xsel/grammar/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | go install github.com/goccmack/gogll/v3@latest 3 | cd grammar 4 | gogll xpath_grammar.txt 5 | ``` 6 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_no_cgo.go: -------------------------------------------------------------------------------- 1 | // +build !cgo appengine 2 | 3 | package metrics 4 | 5 | func numCgoCall() int64 { 6 | return 0 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/locale.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | import "golang.org/x/text/language" 4 | 5 | var defaultLanguage = language.MustParse("en-US") 6 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/raymond/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: go 3 | 4 | go: 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - 1.7 10 | - tip 11 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/internal/unix2.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | 3 | package internal 4 | 5 | func HasPrivilegesForSymlink() bool { 6 | return true 7 | } 8 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/configuressl/hoverfly-generate-ca-custom-name.sh: -------------------------------------------------------------------------------- 1 | hoverfly -generate-ca-cert -cert-name tutorial.cert -cert-org "Tutorial Certificate Authority" 2 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.mailmap: -------------------------------------------------------------------------------- 1 | Chris Howey 2 | Nathan Youngman <4566+nathany@users.noreply.github.com> 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/vendor/github.com/go-playground/universal-translator/logo.png -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/kind.go: -------------------------------------------------------------------------------- 1 | package urn 2 | 3 | type Kind int 4 | 5 | const ( 6 | NONE Kind = iota 7 | RFC2141 8 | RFC7643 9 | RFC8141 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | 3 | # folders 4 | .idea 5 | .vscode 6 | /tmp 7 | /lab 8 | dev.sh 9 | *csv2table 10 | _test/ 11 | *.test 12 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go: -------------------------------------------------------------------------------- 1 | package node 2 | 3 | type Node struct { 4 | ID int 5 | Value any 6 | } 7 | 8 | type NodeOrderedSet []Node 9 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.9" 5 | - "1.10" 6 | - "1.11" 7 | - tip 8 | 9 | script: 10 | - go test -v ./... 11 | -------------------------------------------------------------------------------- /vendor/gopkg.in/tomb.v1/README.md: -------------------------------------------------------------------------------- 1 | Installation and usage 2 | ---------------------- 3 | 4 | See [gopkg.in/tomb.v1](https://gopkg.in/tomb.v1) for documentation and usage details. 5 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.dll 3 | *.so 4 | *.dylib 5 | 6 | *.test 7 | 8 | *.out 9 | *.txt 10 | 11 | vendor/ 12 | /removecomments 13 | /snake2camel -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Paul Borman 2 | bmatsuo 3 | shawnps 4 | theory 5 | jboverfelt 6 | dsymonds 7 | cd1 8 | wallclockbuilder 9 | dansouza 10 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "math" 4 | 5 | func Odd(n int) bool { 6 | return math.Mod(float64(n), 2.0) == 1.0 7 | } 8 | -------------------------------------------------------------------------------- /docs/mermaid/proxyserver.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | client -->> proxy: request 3 | proxy -->> server: request 4 | server -->> proxy: response 5 | proxy -->> client: response 6 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/proxyauth/login-hoverctl-new-target.sh: -------------------------------------------------------------------------------- 1 | hoverctl login --new-target remote \ 2 | --host hoverfly.example.io \ 3 | --admin-port 8880 \ 4 | --proxy-port 8550 -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/remotehoverfly/create-hoverctl-target.sh: -------------------------------------------------------------------------------- 1 | hoverctl targets create remote \ 2 | --host hoverfly.example.com \ 3 | --admin-port 8880 \ 4 | --proxy-port 8555 -------------------------------------------------------------------------------- /examples/readme.md: -------------------------------------------------------------------------------- 1 | # examples 2 | This directory contains example middleware and simulations that can be used with Hoverfly. Each directory contains context and instructions to help you get started. -------------------------------------------------------------------------------- /vendor/github.com/jackwakefield/gopac/Makefile: -------------------------------------------------------------------------------- 1 | vet: 2 | go vet 3 | 4 | test: 5 | go test 6 | 7 | install_deps: 8 | go get github.com/robertkrimen/otto 9 | go get github.com/stretchr/testify -------------------------------------------------------------------------------- /docs/pages/simulations/basic-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _basic_simulation: 2 | 3 | Basic simulation 4 | ================ 5 | 6 | .. literalinclude:: basic-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.x 7 | - tip 8 | 9 | branches: 10 | only: 11 | - master 12 | 13 | script: make test 14 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_go18.go: -------------------------------------------------------------------------------- 1 | //+build go1.8,!openbsd 2 | 3 | package osext 4 | 5 | import "os" 6 | 7 | func executable() (string, error) { 8 | return os.Executable() 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/ratelimiter/storage.go: -------------------------------------------------------------------------------- 1 | package ratelimiter 2 | 3 | type Storage interface { 4 | GetBucketFor(string) (*LeakyBucket, error) 5 | SetBucketFor(string, LeakyBucket) error 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/type_number.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | func (rt *runtime) newNumberObject(value Value) *object { 4 | return rt.newPrimitiveObject(classNumberName, value.numberValue()) 5 | } 6 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/exportingsimulations/exportingsimulations.mermaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectoLabs/hoverfly/HEAD/docs/pages/tutorials/basic/exportingsimulations/exportingsimulations.mermaid.png -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/generate.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | //go:generate go run ./tools/gen-jscore -output inline.go 4 | //go:generate stringer -type=valueKind -trimprefix=value -output=value_kind.gen.go 5 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/specificurls/filter-dest-dry-run.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl destination "ip" --dry-run http://ip.jsontest.com 3 | hoverctl destination "ip" --dry-run http://time.jsontest.com 4 | hoverctl stop -------------------------------------------------------------------------------- /hoverctl/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/SpectoLabs/hoverfly/hoverctl/cmd" 4 | 5 | var ( 6 | hoverctlVersion = "0.0.1" 7 | ) 8 | 9 | func main() { 10 | cmd.Execute(hoverctlVersion) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.gitignore: -------------------------------------------------------------------------------- 1 | # go test -c output 2 | *.test 3 | *.test.exe 4 | 5 | # Output of go build ./cmd/fsnotify 6 | /fsnotify 7 | /fsnotify.exe 8 | 9 | /test/kqueue 10 | /test/a.out 11 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/type_boolean.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | func (rt *runtime) newBooleanObject(value Value) *object { 4 | return rt.newPrimitiveObject(classBooleanName, boolValue(value.bool())) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.mailmap: -------------------------------------------------------------------------------- 1 | Steve Francia 2 | Bjørn Erik Pedersen 3 | Fabiano Franz 4 | -------------------------------------------------------------------------------- /docs/mermaid/proxyconfigs.mermaid: -------------------------------------------------------------------------------- 1 | graph LR; 2 | ca[client a]---proxy 3 | cb[client b]---proxy 4 | cc[client ...]---proxy 5 | proxy---sa[server a] 6 | proxy---sb[server b] 7 | proxy---sc[server ...] 8 | -------------------------------------------------------------------------------- /vendor/github.com/golang-jwt/jwt/v4/doc.go: -------------------------------------------------------------------------------- 1 | // Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html 2 | // 3 | // See README.md for more info. 4 | package jwt 5 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /docs/pages/introduction/introduction.rst: -------------------------------------------------------------------------------- 1 | .. _introduction: 2 | 3 | Introduction 4 | ============ 5 | 6 | .. toctree:: 7 | :maxdepth: 3 8 | 9 | motivation 10 | downloadinstallation 11 | gettingstarted 12 | -------------------------------------------------------------------------------- /docs/pages/simulations/all-matchers-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _all_matchers_simulation: 2 | 3 | Basic simulation 4 | ================ 5 | 6 | .. literalinclude:: all-matchers-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/.gitignore: -------------------------------------------------------------------------------- 1 | *.[68] 2 | *.a 3 | *.out 4 | *.swp 5 | _obj 6 | _testmain.go 7 | cmd/metrics-bench/metrics-bench 8 | cmd/metrics-example/metrics-example 9 | cmd/never-read/never-read 10 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_cgo.go: -------------------------------------------------------------------------------- 1 | // +build cgo 2 | // +build !appengine 3 | 4 | package metrics 5 | 6 | import "runtime" 7 | 8 | func numCgoCall() int64 { 9 | return runtime.NumCgoCall() 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | package metrics 4 | 5 | import "runtime" 6 | 7 | func gcCPUFraction(memStats *runtime.MemStats) float64 { 8 | return 0 9 | } 10 | -------------------------------------------------------------------------------- /docs/mermaid/middleware.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant Hoverfly 3 | participant Middleware 4 | Hoverfly -->> Middleware: stdin 5 | note over Middleware: [json editing] 6 | Middleware -->> Hoverfly: stdout 7 | -------------------------------------------------------------------------------- /docs/pages/simulations/basic-delay-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _basic_delay_simulation: 2 | 3 | Basic delay simulation 4 | ====================== 5 | 6 | .. literalinclude:: basic-delay-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/loosematching/loosematching.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy http://localhost:8500 http://echo.jsontest.com/foo/baz/bar/spam 4 | hoverctl export simulation.json 5 | hoverctl stop 6 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/options.go: -------------------------------------------------------------------------------- 1 | package urn 2 | 3 | type Option func(Machine) 4 | 5 | func WithParsingMode(mode ParsingMode) Option { 6 | return func(m Machine) { 7 | m.WithParsingMode(mode) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /docs/pages/simulations/basic-encoded-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _basic_encoded_simulation: 2 | 3 | Basic encoded simulation 4 | ======================== 5 | 6 | .. literalinclude:: basic-encoded-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/boltsync_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!plan9,!linux,!openbsd 2 | 3 | package bolt 4 | 5 | // fdatasync flushes written data to a file descriptor. 6 | func fdatasync(db *DB) error { 7 | return db.file.Sync() 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/dsnet/compress/brotli/dict_encoder.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Joe Tsai. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | package brotli 6 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/system_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build freebsd || openbsd || netbsd || dragonfly 2 | 3 | package fsnotify 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC 8 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/system_darwin.go: -------------------------------------------------------------------------------- 1 | //go:build darwin 2 | 3 | package fsnotify 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | // note: this constant is not defined on BSD 8 | const openMode = unix.O_EVTONLY | unix.O_CLOEXEC 9 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/.cirrus.yml: -------------------------------------------------------------------------------- 1 | task: 2 | name: FreeBSD 3 | freebsd_instance: 4 | image_family: freebsd-12-2 5 | install_script: pkg install -y go 6 | script: | 7 | go build 8 | go test -v -race -timeout 2m ./... 9 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/.gitignore: -------------------------------------------------------------------------------- 1 | .test 2 | otto/otto 3 | otto/otto-* 4 | tools/tester/testdata/ 5 | tools/tester/tester 6 | tools/gen-jscore/gen-jscore 7 | tools/gen-tokens/gen-tokens 8 | .idea 9 | dist/ 10 | .vscode/ 11 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/MAINTAINERS: -------------------------------------------------------------------------------- 1 | maintainers: 2 | - spf13 3 | - johnSchnake 4 | - jpmcb 5 | - marckhouzam 6 | inactive: 7 | - anthonyfok 8 | - bep 9 | - bogem 10 | - broady 11 | - eparis 12 | - jharshman 13 | - wfernandes 14 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/allresponses/delays-simulate.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl import simulation.json 3 | curl --proxy localhost:8500 http://time.jsontest.com 4 | curl --proxy localhost:8500 http://date.jsontest.com 5 | hoverctl stop 6 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/multiplehosts/delays-simulate.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl import simulation.json 3 | curl --proxy localhost:8500 http://time.jsontest.com 4 | curl --proxy localhost:8500 http://date.jsontest.com 5 | hoverctl stop 6 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/loosematching/loosematchingimport.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode simulate 3 | hoverctl import simulationimport.json 4 | curl --proxy http://localhost:8500 http://echo.jsontest.com/foo/QUX/bar/spam 5 | hoverctl stop 6 | -------------------------------------------------------------------------------- /vendor/github.com/jackwakefield/gopac/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | GoPac contributors (sorted alphabetically) 2 | ============================================ 3 | 4 | * **[Benji Hooper](https://github.com/benjih)** 5 | 6 | * Add ParseBytes func to Parser 7 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_gccpufraction.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package metrics 4 | 5 | import "runtime" 6 | 7 | func gcCPUFraction(memStats *runtime.MemStats) float64 { 8 | return memStats.GCCPUFraction 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4.3 4 | - 1.5.4 5 | - 1.6.2 6 | - tip 7 | 8 | matrix: 9 | allow_failures: 10 | - go: tip 11 | 12 | script: 13 | - go test -v ./... 14 | sudo: false 15 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/internal/gonum/gonum.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2016 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gonum 6 | -------------------------------------------------------------------------------- /docs/pages/simulations/get-method-delay-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _get_method_delay_simulation: 2 | 3 | GET method delay simulation 4 | =========================== 5 | 6 | .. literalinclude:: get-method-delay-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /docs/pages/simulations/log-normal-delay-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _log_normal_delay_simulation: 2 | 3 | Log-normal delay simulation 4 | =========================== 5 | 6 | .. literalinclude:: log-normal-delay-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/parsing_mode.go: -------------------------------------------------------------------------------- 1 | package urn 2 | 3 | type ParsingMode int 4 | 5 | const ( 6 | Default ParsingMode = iota 7 | RFC2141Only 8 | RFC7643Only 9 | RFC8141Only 10 | ) 11 | 12 | const DefaultParsingMode = RFC2141Only 13 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/httpmethods/delays-simulate.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl import simulation.json 3 | curl --proxy localhost:8500 http://echo.jsontest.com/b/c 4 | curl -X POST --proxy localhost:8500 http://echo.jsontest.com/b/c 5 | hoverctl stop 6 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/lognormal/delays-simulate.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl import simulation.json 3 | curl --proxy localhost:8500 http://echo.jsontest.com/b/c 4 | curl -X POST --proxy localhost:8500 http://echo.jsontest.com/b/c 5 | hoverctl stop 6 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_linux.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | // fdatasync flushes written data to a file descriptor. 8 | func fdatasync(db *DB) error { 9 | return syscall.Fdatasync(int(db.file.Fd())) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/dghubble/sling/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | all: test vet fmt 3 | 4 | .PHONY: test 5 | test: 6 | @go test . -cover 7 | 8 | .PHONY: vet 9 | vet: 10 | @go vet -all . 11 | 12 | .PHONY: fmt 13 | fmt: 14 | @test -z $$(go fmt ./...) 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_appengine.go: -------------------------------------------------------------------------------- 1 | //go:build appengine 2 | // +build appengine 3 | 4 | package runewidth 5 | 6 | // IsEastAsian return true if the current locale is CJK 7 | func IsEastAsian() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/cmpl.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | import ( 4 | "github.com/robertkrimen/otto/ast" 5 | "github.com/robertkrimen/otto/file" 6 | ) 7 | 8 | type compiler struct { 9 | file *file.File 10 | program *ast.Program 11 | } 12 | -------------------------------------------------------------------------------- /docs/pages/reference/simulationschema.rst: -------------------------------------------------------------------------------- 1 | .. _simulation_schema: 2 | 3 | Simulation schema 4 | ================= 5 | 6 | This is the JSON schema for v5 Hoverfly simulations. 7 | 8 | .. literalinclude:: ../../../core/handlers/v2/schema.json 9 | :language: javascript -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/allresponses/delays-capture.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy localhost:8500 http://time.jsontest.com 4 | curl --proxy localhost:8500 http://date.jsontest.com 5 | hoverctl export simulation.json 6 | hoverctl stop -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/multiplehosts/delays-capture.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy localhost:8500 http://time.jsontest.com 4 | curl --proxy localhost:8500 http://date.jsontest.com 5 | hoverctl export simulation.json 6 | hoverctl stop -------------------------------------------------------------------------------- /functional-tests/hoverctl/testdata/delays.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "urlPattern": "host1", 5 | "delay": 100 6 | }, 7 | { 8 | "httpMethod": "POST", 9 | "urlPattern": "host2", 10 | "delay": 110 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/dbg.go: -------------------------------------------------------------------------------- 1 | // This file was AUTOMATICALLY GENERATED by dbg-import (smuggol) for github.com/robertkrimen/dbg 2 | 3 | package otto 4 | 5 | import ( 6 | Dbg "github.com/robertkrimen/otto/dbg" 7 | ) 8 | 9 | var dbg, dbgf = Dbg.New() 10 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.go] 12 | indent_style = tab 13 | -------------------------------------------------------------------------------- /docs/pages/simulations/multiple-hosts-delay-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _multiple_hosts_delay_simulation: 2 | 3 | Multiple hosts delay simulation 4 | =============================== 5 | 6 | .. literalinclude:: multiple-hosts-delay-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /docs/mermaid/simulate.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant Client application 3 | participant Hoverfly 4 | participant External service 5 | loop http 6 | Client application -->> Hoverfly: request 7 | Hoverfly -->> Client application: response 8 | end -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/remotehoverfly/curl-proxy-remote-hoverfly.sh: -------------------------------------------------------------------------------- 1 | hoverctl -t remote mode capture 2 | curl --proxy http://hoverfly.example.com:8555 http://ip.jsontest.com 3 | hoverctl -t remote mode simulate 4 | curl --proxy http://hoverfly.example.com:8555 http://ip.jsontest.com -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/httpmethods/delays-capture.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy localhost:8500 http://echo.jsontest.com/b/c 4 | curl --proxy localhost:8500 -X POST http://echo.jsontest.com/b/c 5 | hoverctl export simulation.json 6 | hoverctl stop -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/lognormal/delays-capture.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy localhost:8500 http://echo.jsontest.com/b/c 4 | curl --proxy localhost:8500 -X POST http://echo.jsontest.com/b/c 5 | hoverctl export simulation.json 6 | hoverctl stop -------------------------------------------------------------------------------- /core/matching/matchers/exact_match.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | var Exact = "exact" 4 | 5 | func ExactMatch(match interface{}, toMatch string) bool { 6 | matchString, ok := match.(string) 7 | if !ok { 8 | return false 9 | } 10 | 11 | return matchString == toMatch 12 | } 13 | -------------------------------------------------------------------------------- /core/matching/matchers/negation_match.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | var Negation = "negate" 4 | 5 | func NegationMatch(match interface{}, toMatch string) bool { 6 | matchString, ok := match.(string) 7 | if ok { 8 | return matchString != toMatch 9 | } 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/xeipuuv/gojsonschema/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - "1.11" 4 | - "1.12" 5 | - "1.13" 6 | before_install: 7 | - go get github.com/xeipuuv/gojsonreference 8 | - go get github.com/xeipuuv/gojsonpointer 9 | - go get github.com/stretchr/testify/assert 10 | -------------------------------------------------------------------------------- /core/handlers/v2/template_datasource_views.go: -------------------------------------------------------------------------------- 1 | package v2 2 | 3 | type TemplateDataSourceView struct { 4 | DataSources []CSVDataSourceView `json:"csvDataSources,omitempty"` 5 | } 6 | 7 | type CSVDataSourceView struct { 8 | Name string `json:"name"` 9 | Data string `json:"data"` 10 | } 11 | -------------------------------------------------------------------------------- /docs/mermaid/capture.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant Client application 3 | participant Hoverfly 4 | participant External service 5 | loop http 6 | Client application -->> External service: request 7 | External service -->> Client application: response 8 | end -------------------------------------------------------------------------------- /docs/pages/bindings/bindings.rst: -------------------------------------------------------------------------------- 1 | .. _bindings: 2 | 3 | Native language bindings 4 | ======================== 5 | 6 | Native language bindings are available for Hoverfly to make it easy to integrate into different environments. 7 | 8 | .. toctree:: 9 | 10 | python 11 | java 12 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/modes/spy.rst: -------------------------------------------------------------------------------- 1 | .. _spy_mode: 2 | 3 | Spy mode 4 | ======== 5 | 6 | In this mode, Hoverfly simulates external APIs if a request match is found in simulation data (See :ref:`simulate_mode`), 7 | otherwise, the request will be passed through to the real API. 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/pages/simulations/multiple-locations-delay-simulation.rst: -------------------------------------------------------------------------------- 1 | .. _multiple_locations_delay_simulation: 2 | 3 | Multiple locations delay simulation 4 | =================================== 5 | 6 | .. literalinclude:: multiple-locations-delay-simulation.json 7 | :linenos: 8 | :language: javascript -------------------------------------------------------------------------------- /docs/mermaid/synthesize.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant Client application 3 | participant Hoverfly 4 | loop http 5 | Client application -->> Hoverfly: request 6 | note over Hoverfly: middleware.py 7 | Hoverfly -->> Client application: response 8 | end 9 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | //go:build js && !appengine 2 | // +build js,!appengine 3 | 4 | package runewidth 5 | 6 | func IsEastAsian() bool { 7 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && arm 6 | 7 | package cpu 8 | 9 | func archInit() {} 10 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/proxyauth/curl-proxy-basic-auth.sh: -------------------------------------------------------------------------------- 1 | hoverctl -t remote mode capture 2 | curl --proxy http://my-user:my-pass@hoverfly.example.com:8555 http://ip.jsontest.com 3 | hoverctl -t remote mode simulate 4 | curl --proxy http://my-user:my-pass@hoverfly.example.com:8555 http://ip.jsontest.com -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/specificurls/filter-dest-dry-run-regex.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl destination "^.*api.*com" --dry-run https://api.github.com 3 | hoverctl destination "^.*api.*com" --dry-run https://api.slack.com 4 | hoverctl destination "^.*api.*com" --dry-run https://github.com 5 | hoverctl stop -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | func archInit() { 8 | doinit() 9 | Initialized = true 10 | } 11 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/advanced.rst: -------------------------------------------------------------------------------- 1 | .. _advanced_tutorials: 2 | 3 | Advanced tutorials 4 | ================== 5 | 6 | .. toctree:: 7 | :maxdepth: 3 8 | 9 | behindaproxy/behindaproxy 10 | remotehoverfly/remotehoverfly 11 | proxyauth/proxyauth 12 | configuressl/configuressl -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_ppc.go: -------------------------------------------------------------------------------- 1 | // +build ppc 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0x7FFFFFFF // 2GB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0xFFFFFFF 10 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/modes/modes.rst: -------------------------------------------------------------------------------- 1 | .. _modes: 2 | 3 | Hoverfly modes 4 | ============== 5 | 6 | Hoverfly has six different modes. It can only run in one mode at any one time. 7 | 8 | .. toctree:: 9 | 10 | capture 11 | simulate 12 | spy 13 | synthesize 14 | modify 15 | diff 16 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/specificurls/filter-dest.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl destination "ip" 3 | hoverctl mode capture 4 | curl --proxy http://localhost:8500 http://ip.jsontest.com 5 | curl --proxy http://localhost:8500 http://time.jsontest.com 6 | hoverctl logs 7 | hoverctl export simulation.json 8 | hoverctl stop -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Google LLC (https://opensource.google.com/) 8 | Joachim Bauch 9 | 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-zoo/bone/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | 1. Fork it 4 | 2. Create your feature branch (git checkout -b my-new-feature) 5 | 3. Write Tests! 6 | 4. Commit your changes (git commit -am 'Add some feature') 7 | 5. Push to the branch (git push origin my-new-feature) 8 | 6. Create new Pull Request 9 | -------------------------------------------------------------------------------- /vendor/github.com/tdewolff/minify/v2/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | enable: 3 | - depguard 4 | - dogsled 5 | - gofmt 6 | - goimports 7 | - golint 8 | - gosec 9 | - govet 10 | - megacheck 11 | - misspell 12 | - nakedret 13 | - prealloc 14 | - unconvert 15 | - unparam 16 | - wastedassign 17 | -------------------------------------------------------------------------------- /vendor/github.com/tdewolff/parse/v2/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | enable: 3 | - depguard 4 | - dogsled 5 | - gofmt 6 | - goimports 7 | - golint 8 | - gosec 9 | - govet 10 | - megacheck 11 | - misspell 12 | - nakedret 13 | - prealloc 14 | - unconvert 15 | - unparam 16 | - wastedassign 17 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/c64/conj.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package c64 6 | 7 | func conj(c complex64) complex64 { return complex(real(c), -imag(c)) } 8 | -------------------------------------------------------------------------------- /docs/pages/community.rst: -------------------------------------------------------------------------------- 1 | .. _ccommunity: 2 | 3 | Community 4 | ========= 5 | 6 | - Chat on the `Hoverfly Discussions `_ 7 | - Raise a `GitHub Issue `_ 8 | - Get in touch with `Hoverfly Cloud `_ 9 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/randomlatency/modify.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy http://localhost:8500 http://time.jsontest.com 4 | hoverctl mode simulate 5 | hoverctl middleware --binary python --script middleware.py 6 | curl --proxy http://localhost:8500 http://time.jsontest.com 7 | hoverctl stop 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && !netbsd && !openbsd && arm64 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/modifyingresponses/modify.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy http://localhost:8500 http://time.jsontest.com 4 | hoverctl mode simulate 5 | hoverctl middleware --binary python --script middleware.py 6 | curl --proxy http://localhost:8500 http://time.jsontest.com 7 | hoverctl stop 8 | -------------------------------------------------------------------------------- /vendor/github.com/icrowley/fake/currencies.go: -------------------------------------------------------------------------------- 1 | package fake 2 | 3 | // Currency generates currency name 4 | func Currency() string { 5 | return lookup(lang, "currencies", true) 6 | } 7 | 8 | // CurrencyCode generates currency code 9 | func CurrencyCode() string { 10 | return lookup(lang, "currency_codes", true) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/stat/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package stat provides generalized statistical functions. 6 | package stat // import "gonum.org/v1/gonum/stat" 7 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | Comments (at Discussions), Issues and PRs are always welcome. In the case of issues, 3 | code examples make it easier to reproduce the problem. In the case of PRs add tests 4 | if applicable so we make sure nothing breaks for people using the library on different 5 | OSes. 6 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /core/matching/matchers/glob_match.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import "github.com/ryanuber/go-glob" 4 | 5 | var Glob = "glob" 6 | 7 | func GlobMatch(match interface{}, toMatch string) bool { 8 | matchString, ok := match.(string) 9 | if !ok { 10 | return false 11 | } 12 | 13 | return glob.Glob(matchString, toMatch) 14 | } 15 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/multiplelocations/delays-capture.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl mode capture 3 | curl --proxy localhost:8500 http://echo.jsontest.com/a/b 4 | curl --proxy localhost:8500 http://echo.jsontest.com/b/c 5 | curl --proxy localhost:8500 http://echo.jsontest.com/c/d 6 | hoverctl export simulation.json 7 | hoverctl stop -------------------------------------------------------------------------------- /vendor/github.com/dsnet/compress/internal/gofuzz.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016, Joe Tsai. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build gofuzz 6 | 7 | package internal 8 | 9 | const ( 10 | Debug = true 11 | GoFuzz = true 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/validate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # check there are no formatting issues 6 | GOFMT_LINES=`gofmt -l . | wc -l | xargs` 7 | test $GOFMT_LINES -eq 0 || echo "gofmt needs to be run, ${GOFMT_LINES} files have issues" 8 | 9 | # run the tests for the root package 10 | go test -race . 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips || mipsle 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func initOptions() {} 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && riscv64 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | Initialized = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f32/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package f32 provides float32 vector primitives. 6 | package f32 // import "gonum.org/v1/gonum/internal/asm/f32" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package f64 provides float64 vector primitives. 6 | package f64 // import "gonum.org/v1/gonum/internal/asm/f64" 7 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "1.14.x" 15 | - "tip" 16 | 17 | go_import_path: gopkg.in/yaml.v2 18 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/delays/multiplelocations/delays-simulate.sh: -------------------------------------------------------------------------------- 1 | hoverctl start 2 | hoverctl import simulation.json 3 | hoverctl mode simulate 4 | curl --proxy localhost:8500 http://echo.jsontest.com/a/b 5 | curl --proxy localhost:8500 http://echo.jsontest.com/b/c 6 | curl --proxy localhost:8500 http://echo.jsontest.com/c/d 7 | hoverctl stop 8 | -------------------------------------------------------------------------------- /examples/simulations/README.md: -------------------------------------------------------------------------------- 1 | # simulations 2 | This directory contains example simulation files that can be used with Hoverfly. 3 | 4 | ``` 5 | hoverctl import hoverfly.io.json 6 | ``` 7 | 8 | To find out more, please check the documentation regarding [simulations](https://docs.hoverfly.io/en/latest/pages/keyconcepts/simulations/simulations.html). -------------------------------------------------------------------------------- /vendor/github.com/dsnet/compress/internal/debug.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Joe Tsai. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build debug,!gofuzz 6 | 7 | package internal 8 | 9 | const ( 10 | Debug = true 11 | GoFuzz = false 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix zos 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TCGETS 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/c64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package c64 provides complex64 vector primitives. 6 | package c64 // import "gonum.org/v1/gonum/internal/asm/c64" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mat/README.md: -------------------------------------------------------------------------------- 1 | # Gonum matrix 2 | 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/mat)](https://pkg.go.dev/gonum.org/v1/gonum/mat) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/mat?status.svg)](https://godocs.io/gonum.org/v1/gonum/mat) 5 | 6 | Package mat is a matrix package for the Go language. 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/golang-lru/testing.go: -------------------------------------------------------------------------------- 1 | package lru 2 | 3 | import ( 4 | "crypto/rand" 5 | "math" 6 | "math/big" 7 | "testing" 8 | ) 9 | 10 | func getRand(tb testing.TB) int64 { 11 | out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64)) 12 | if err != nil { 13 | tb.Fatal(err) 14 | } 15 | return out.Int64() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/c128/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package c128 provides complex128 vector primitives. 6 | package c128 // import "gonum.org/v1/gonum/internal/asm/c128" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2018 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package lapack provides interfaces for the LAPACK linear algebra standard. 6 | package lapack // import "gonum.org/v1/gonum/lapack" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/stat/distuv/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package distuv provides univariate random distribution types. 6 | package distuv // import "gonum.org/v1/gonum/stat/distuv" 7 | -------------------------------------------------------------------------------- /vendor/github.com/dsnet/compress/brotli/prefix_encoder.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Joe Tsai. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | package brotli 6 | 7 | type prefixEncoder struct{} 8 | 9 | func (pe *prefixEncoder) Init(codes []prefixCode) {} 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/golang-lru/README.md: -------------------------------------------------------------------------------- 1 | golang-lru 2 | ========== 3 | 4 | Please upgrade to github.com/hashicorp/golang-lru/v2 for all new code as v1 will 5 | not be updated anymore. The v2 version supports generics and is faster; old code 6 | can specify a specific tag, e.g. github.com/hashicorp/golang-lru/v1.0.2 for 7 | backwards compatibility. 8 | -------------------------------------------------------------------------------- /vendor/github.com/icrowley/fake/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [{*.go,go.mod,go.sum}] 12 | indent_style = tab 13 | 14 | [makefile] 15 | indent_style = tab 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on on appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/xeipuuv/gojsonreference/README.md: -------------------------------------------------------------------------------- 1 | # gojsonreference 2 | An implementation of JSON Reference - Go language 3 | 4 | ## Dependencies 5 | https://github.com/xeipuuv/gojsonpointer 6 | 7 | ## References 8 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 9 | 10 | http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && (mips64 || mips64le) 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | Initialized = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/blas64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package blas64 provides a simple interface to the float64 BLAS API. 6 | package blas64 // import "gonum.org/v1/gonum/blas/blas64" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/stat/README.md: -------------------------------------------------------------------------------- 1 | # Gonum stat 2 | 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/stat)](https://pkg.go.dev/gonum.org/v1/gonum/stat) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/stat?status.svg)](https://godocs.io/gonum.org/v1/gonum/stat) 5 | 6 | Package stat is a statistics package for the Go language. 7 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go: -------------------------------------------------------------------------------- 1 | package specrunner 2 | 3 | import ( 4 | "crypto/rand" 5 | "fmt" 6 | ) 7 | 8 | func randomID() string { 9 | b := make([]byte, 8) 10 | _, err := rand.Read(b) 11 | if err != nil { 12 | return "" 13 | } 14 | return fmt.Sprintf("%x-%x-%x-%x", b[0:2], b[2:4], b[4:6], b[6:8]) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/cblas128/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package cblas128 provides a simple interface to the complex128 BLAS API. 6 | package cblas128 // import "gonum.org/v1/gonum/blas/cblas128" 7 | -------------------------------------------------------------------------------- /docs/pages/tutorials/advanced/proxyauth/config.yml: -------------------------------------------------------------------------------- 1 | hoverfly.host: hoverfly.example.com 2 | hoverfly.admin.port: "8880" 3 | hoverfly.proxy.port: "8555" 4 | hoverfly.db.type: memory 5 | hoverfly.username: "my-user" 6 | hoverfly.password: "my-pass" 7 | hoverfly.webserver: false 8 | hoverfly.tls.certificate: "" 9 | hoverfly.tls.key: "" 10 | hoverfly.tls.disable: false -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question-about-Hoverfly.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Questions about Hoverfly 3 | about: This is not the appropriate channel - please use our Gitter channel 4 | 5 | --- 6 | 7 | Please use: https://gitter.im/SpectoLabs/hoverfly for questions about `Hoverfly`. 8 | 9 | Only posts that are bug reports or feature/enhancement requests will be addressed here. 10 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/asawebserver/asawebserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | hoverctl start 4 | hoverctl mode capture 5 | curl --proxy http://localhost:8500 http://echo.jsontest.com/a/b 6 | hoverctl export simulation.json 7 | hoverctl stop 8 | 9 | hoverctl start webserver 10 | hoverctl import simulation.json 11 | curl http://localhost:8500/a/b 12 | hoverctl stop 13 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_386.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0x7FFFFFFF // 2GB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0xFFFFFFF 8 | 9 | // Are unaligned load/stores broken on this arch? 10 | var brokenUnaligned = false 11 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | package cpu 8 | 9 | func getisar0() uint64 10 | func getisar1() uint64 11 | func getpfr0() uint64 12 | func getzfr0() uint64 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/floats/scalar/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package scalar provides a set of helper routines for dealing with float64 values. 6 | package scalar // import "gonum.org/v1/gonum/floats/scalar" 7 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/types/code_location.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type CodeLocation struct { 8 | FileName string 9 | LineNumber int 10 | FullStackTrace string 11 | } 12 | 13 | func (codeLocation CodeLocation) String() string { 14 | return fmt.Sprintf("%s:%d", codeLocation.FileName, codeLocation.LineNumber) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package mathext implements special math functions not implemented by the 6 | // Go standard library. 7 | package mathext // import "gonum.org/v1/gonum/mathext" 8 | -------------------------------------------------------------------------------- /docs/pages/reference/hoverfly/hoverflycommands.rst: -------------------------------------------------------------------------------- 1 | .. _hoverfly_commands: 2 | 3 | Hoverfly commands 4 | ================= 5 | 6 | This page contains the output of: 7 | 8 | .. code:: bash 9 | 10 | hoverfly --help 11 | 12 | The command's help content has been placed here for convenience. 13 | 14 | .. literalinclude:: hoverfly.output 15 | :language: none 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/pages/tutorials/tutorials.rst: -------------------------------------------------------------------------------- 1 | .. _tutorials: 2 | 3 | Tutorials 4 | ========= 5 | 6 | In these examples, we will use the hoverctl (CLI tool for Hoverfly) to interact with Hoverfly. 7 | 8 | Hoverfly can also be controlled via its :ref:`rest_api`, or via :ref:`bindings`. 9 | 10 | .. toctree:: 11 | :maxdepth: 3 12 | 13 | basic/basic 14 | advanced/advanced 15 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_amd64.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0x7FFFFFFF 8 | 9 | // Are unaligned load/stores broken on this arch? 10 | var brokenUnaligned = false 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !linux && (ppc64 || ppc64le) 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | PPC64.IsPOWER8 = true 11 | Initialized = true 12 | } 13 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/internal/amos/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package amos implements functions originally in the Netlib code by Donald Amos. 6 | package amos // import "gonum.org/v1/gonum/mathext/internal/amos" 7 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | clone_folder: c:\gopath\src\github.com\boltdb\bolt 6 | 7 | environment: 8 | GOPATH: c:\gopath 9 | 10 | install: 11 | - echo %PATH% 12 | - echo %GOPATH% 13 | - go version 14 | - go env 15 | - go get -v -t ./... 16 | 17 | build_script: 18 | - go test -v ./... 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | fmt: generate 6 | go fmt ./... 7 | 8 | test: generate 9 | go get -t ./... 10 | go test $(TEST) $(TESTARGS) 11 | 12 | generate: 13 | go generate ./... 14 | 15 | updatedeps: 16 | go get -u golang.org/x/tools/cmd/stringer 17 | 18 | .PHONY: default generate test updatedeps 19 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/sirupsen/logrus 3 | git: 4 | depth: 1 5 | env: 6 | - GO111MODULE=on 7 | go: 1.15.x 8 | os: linux 9 | install: 10 | - ./travis/install.sh 11 | script: 12 | - cd ci 13 | - go run mage.go -v -w ../ crossBuild 14 | - go run mage.go -v -w ../ lint 15 | - go run mage.go -v -w ../ test 16 | -------------------------------------------------------------------------------- /vendor/github.com/xeipuuv/gojsonschema/glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/xeipuuv/gojsonschema 2 | license: Apache 2.0 3 | import: 4 | - package: github.com/xeipuuv/gojsonschema 5 | 6 | - package: github.com/xeipuuv/gojsonpointer 7 | 8 | - package: github.com/xeipuuv/gojsonreference 9 | 10 | testImport: 11 | - package: github.com/stretchr/testify 12 | subpackages: 13 | - assert 14 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/stat/combin/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package combin implements routines involving combinatorics (permutations, 6 | // combinations, etc.). 7 | package combin // import "gonum.org/v1/gonum/stat/combin" 8 | -------------------------------------------------------------------------------- /core/cache/fastcache.go: -------------------------------------------------------------------------------- 1 | package cache 2 | 3 | // FastCache - cache interface used to store and retrieve any data type which requires no serialization 4 | type FastCache interface { 5 | Set(key, value interface{}) error 6 | Get(key interface{}) (interface{}, bool) 7 | GetAllEntries() (map[interface{}]interface{}, error) 8 | RecordsCount() (int, error) 9 | DeleteData() error 10 | } 11 | -------------------------------------------------------------------------------- /core/matching/matchers/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "Authorization": [ 4 | { 5 | "matcher": "jwtjsonpath", 6 | "value": "$.user_name", 7 | "doMatch": { 8 | "matcher": "regex", 9 | "value": "stuart.kelly" 10 | } 11 | } 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /examples/middleware/modify_response/modify_response.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | process.stdin.resume(); 4 | process.stdin.setEncoding('utf8'); 5 | process.stdin.on('data', function(data) { 6 | var parsed_json = JSON.parse(data); 7 | 8 | parsed_json.response.body = "body was replaced by middleware\n"; 9 | 10 | process.stdout.write(JSON.stringify(parsed_json)); 11 | }); 12 | -------------------------------------------------------------------------------- /examples/middleware/modify_response/modify_response.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # encoding: utf-8 3 | 4 | require 'rubygems' 5 | require 'json' 6 | 7 | while payload = STDIN.gets 8 | next unless payload 9 | 10 | jsonPayload = JSON.parse(payload) 11 | 12 | jsonPayload["response"]["body"] = "body was replaced by middleware\n" 13 | 14 | STDOUT.puts jsonPayload.to_json 15 | 16 | end -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/error.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/token" 7 | ) 8 | 9 | // PosError is a parse error that contains a position. 10 | type PosError struct { 11 | Pos token.Pos 12 | Err error 13 | } 14 | 15 | func (e *PosError) Error() string { 16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo 6 | 7 | package cpu 8 | 9 | func getisar0() uint64 { return 0 } 10 | func getisar1() uint64 { return 0 } 11 | func getpfr0() uint64 { return 0 } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && !arm && !arm64 && !loong64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/internal/cephes/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package cephes implements functions originally in the Netlib code by Stephen Mosher. 6 | package cephes // import "gonum.org/v1/gonum/mathext/internal/cephes" 7 | -------------------------------------------------------------------------------- /examples/clients/readthedocs_query/README.md: -------------------------------------------------------------------------------- 1 | # Readthedocs client 2 | 3 | This small Python script can query readthedocs API for 50 (you can change that) projects and then query them all. 4 | The main purpose is to showcase hoverfly and how it can capture and then simulate HTTP(s) traffic. 5 | 6 | More information can be found in this blog post: https://www.specto.io/speeding-up-your-slow-dependencies/ -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/sourcemap.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.6 6 | - 1.7 7 | - tip 8 | 9 | matrix: 10 | allow_failures: 11 | - go: tip 12 | 13 | install: 14 | - mkdir -p $HOME/gopath/src/gopkg.in 15 | - mv $HOME/gopath/src/github.com/go-sourcemap/sourcemap $HOME/gopath/src/gopkg.in/sourcemap.v1 16 | - cd $HOME/gopath/src/gopkg.in/sourcemap.v1 17 | -------------------------------------------------------------------------------- /vendor/github.com/corpix/uarand/shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | nixpkgs = ; 3 | in with import nixpkgs {}; 4 | stdenv.mkDerivation { 5 | name = "nix-shell"; 6 | buildInputs = [ 7 | coreutils bashInteractive jq curl gcc git gnumake 8 | go golangci-lint cacert openssl python3 9 | ]; 10 | shellHook = '' 11 | unset GOPATH 12 | export NIX_PATH=nixpkgs=${nixpkgs} 13 | ''; 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | We definitely welcome patches and contribution to this project! 4 | 5 | ### Legal requirements 6 | 7 | In order to protect both you and ourselves, you will need to sign the 8 | [Contributor License Agreement](https://cla.developers.google.com/clas). 9 | 10 | You may have already signed it for other Google projects. 11 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | - tip 10 | 11 | matrix: 12 | allow_failures: 13 | - go: tip 14 | 15 | install: 16 | - go get golang.org/x/lint/golint 17 | - export PATH=$GOPATH/bin:$PATH 18 | - go install ./... 19 | 20 | script: 21 | - verify/all.sh -v 22 | - go test ./... 23 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/README.md: -------------------------------------------------------------------------------- 1 | # mathext 2 | 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/mathext)](https://pkg.go.dev/gonum.org/v1/gonum/mathext) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/mathext?status.svg)](https://godocs.io/gonum.org/v1/gonum/mathext) 5 | 6 | Package mathext implements basic elementary functions not included in the Go standard library. 7 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/doc.go: -------------------------------------------------------------------------------- 1 | // Package toml implements decoding and encoding of TOML files. 2 | // 3 | // This package supports TOML v1.0.0, as specified at https://toml.io 4 | // 5 | // The github.com/BurntSushi/toml/cmd/tomlv package implements a TOML validator, 6 | // and can be used to verify if TOML document is valid. It can also be used to 7 | // print the type of each key. 8 | package toml 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package flags 6 | 7 | // Deterministic controls whether the output of Diff should be deterministic. 8 | // This is only used for testing. 9 | var Deterministic bool 10 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package math32 provides float32 versions of standard library math package 6 | // routines used by gonum/blas/native. 7 | package math32 // import "gonum.org/v1/gonum/internal/math32" 8 | -------------------------------------------------------------------------------- /core/matching/matchers/regex_match.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import "regexp" 4 | 5 | var Regex = "regex" 6 | 7 | func RegexMatch(match interface{}, toMatch string) bool { 8 | matchString, ok := match.(string) 9 | if !ok { 10 | return false 11 | } 12 | 13 | result, err := regexp.MatchString(matchString, toMatch) 14 | if err != nil { 15 | return false 16 | } 17 | 18 | return result 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_arm64.go: -------------------------------------------------------------------------------- 1 | // +build arm64 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | 11 | // Are unaligned load/stores broken on this arch? 12 | var brokenUnaligned = false 13 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_ppc64.go: -------------------------------------------------------------------------------- 1 | // +build ppc64 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | 11 | // Are unaligned load/stores broken on this arch? 12 | var brokenUnaligned = false 13 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build ppc64le 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | 11 | // Are unaligned load/stores broken on this arch? 12 | var brokenUnaligned = false 13 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_s390x.go: -------------------------------------------------------------------------------- 1 | // +build s390x 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | 11 | // Are unaligned load/stores broken on this arch? 12 | var brokenUnaligned = false 13 | -------------------------------------------------------------------------------- /vendor/github.com/tdewolff/minify/v2/xml/table.go: -------------------------------------------------------------------------------- 1 | package xml 2 | 3 | // EntitiesMap are all named character entities. 4 | var EntitiesMap = map[string][]byte{ 5 | "apos": []byte("'"), 6 | "quot": []byte("\""), 7 | } 8 | 9 | // TextRevEntitiesMap is a map of escapes. 10 | var TextRevEntitiesMap = map[byte][]byte{ 11 | '<': []byte("<"), 12 | '>': []byte(">"), 13 | '&': []byte("&"), 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 || amd64p32 || (amd64 && (!darwin || !gc)) 6 | 7 | package cpu 8 | 9 | func darwinSupportsAVX512() bool { 10 | panic("only implemented for gc && amd64 && darwin") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package cmplx64 provides complex64 versions of standard library math/cmplx 6 | // package routines used by gonum/blas. 7 | package cmplx64 // import "gonum.org/v1/gonum/internal/cmplx64" 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/golang-lru/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || linux || solaris || zos 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TCGETS 12 | const ioctlWriteTermios = unix.TCSETS 13 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | 25 | *.bench 26 | -------------------------------------------------------------------------------- /examples/middleware/modify_response/modify_response.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | import json 4 | 5 | def main(): 6 | data = sys.stdin.readlines() 7 | payload = data[0] 8 | 9 | payload_dict = json.loads(payload) 10 | payload_dict['response']['body'] = "body was replaced by middleware\n" 11 | 12 | print(json.dumps(payload_dict)) 13 | 14 | if __name__ == "__main__": 15 | main() 16 | -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/data/html.go: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | // Html consists of various html information 4 | var Html = map[string][]string{ 5 | "svg": {"rect", "circle", "ellipse", "line", "polyline", "polygon"}, 6 | "input_name": {"title", "first_name", "last_name", "suffix", "address", "postal_code", "city", "state", "country", "date_of_birth", "card_number", "description", "message", "status"}, 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .idea/ 25 | *.iml 26 | -------------------------------------------------------------------------------- /vendor/github.com/jackwakefield/gopac/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go: -------------------------------------------------------------------------------- 1 | package remote 2 | 3 | import "os" 4 | 5 | /* 6 | The OutputInterceptor is used by the ForwardingReporter to 7 | intercept and capture all stdin and stderr output during a test run. 8 | */ 9 | type OutputInterceptor interface { 10 | StartInterceptingOutput() error 11 | StopInterceptingAndReturnOutput() (string, error) 12 | StreamTo(*os.File) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/jwalterweatherman/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.bench 24 | go.sum -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !386 && !amd64 && !amd64p32 && !arm64 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | if err := readHWCAP(); err != nil { 11 | return 12 | } 13 | doinit() 14 | Initialized = true 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips64 || mips64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func initOptions() { 12 | options = []option{ 13 | {Name: "msa", Feature: &MIPS64X.HasMSA}, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/pages/reference/reference.rst: -------------------------------------------------------------------------------- 1 | .. _reference: 2 | 3 | 4 | Reference 5 | ========= 6 | 7 | These reference documents contain information regarding invoking the hoverctl command, hoverfly command, and interacting with the APIs. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | hoverctl/hoverctlcommands 13 | hoverfly/hoverflycommands 14 | hoverfly/request_matchers 15 | api/api 16 | simulationschema 17 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/goproxy/all.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | go test || exit 4 | for action in $@; do go $action; done 5 | 6 | mkdir -p bin 7 | find regretable examples/* ext/* -maxdepth 0 -type d | while read d; do 8 | (cd $d 9 | go build -o ../../bin/$(basename $d) 10 | find *_test.go -maxdepth 0 2>/dev/null|while read f;do 11 | for action in $@; do go $action; done 12 | go test 13 | break 14 | done) 15 | done 16 | -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/data/log_level.go: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | // LogLevels consists of log levels for several types 4 | var LogLevels = map[string][]string{ 5 | "general": {"error", "warning", "info", "fatal", "trace", "debug"}, 6 | "syslog": {"emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"}, 7 | "apache": {"emerg", "alert", "crit", "error", "warn", "notice", "info", "debug", "trace1-8"}, 8 | } 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/japanese/all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package japanese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{EUCJP, ISO2022JP, ShiftJIS} 13 | -------------------------------------------------------------------------------- /core/cache/cache.go: -------------------------------------------------------------------------------- 1 | package cache 2 | 3 | // Cache - cache interface used to store and retrieve serialized data 4 | type Cache interface { 5 | Set(key, value []byte) error 6 | Get(key []byte) ([]byte, error) 7 | GetAllValues() ([][]byte, error) 8 | GetAllEntries() (map[string][]byte, error) 9 | RecordsCount() (int, error) 10 | Delete(key []byte) error 11 | DeleteData() error 12 | GetAllKeys() (map[string]bool, error) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/SpectoLabs/goxml2json/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | /.tags 26 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/.clog.toml: -------------------------------------------------------------------------------- 1 | [clog] 2 | repository = "https://github.com/robertkrimen/otto" 3 | subtitle = "Release Notes" 4 | 5 | [sections] 6 | "Refactors" = ["refactor"] 7 | "Chores" = ["chore"] 8 | "Continuous Integration" = ["ci"] 9 | "Improvements" = ["imp", "improvement"] 10 | "Features" = ["feat", "feature"] 11 | "Legacy" = ["legacy"] 12 | "QA" = ["qa", "test", "tests"] 13 | "Documentation" = ["doc", "docs"] 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || dragonfly || freebsd || netbsd || openbsd 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/state/state.rst: -------------------------------------------------------------------------------- 1 | .. _state: 2 | 3 | 4 | State 5 | ----- 6 | 7 | Hoverfly contains a map of keys and values which it uses to store it's internal state. Some :ref:`request_matchers` can be made to only 8 | match when Hoverfly is in a certain state, and other matchers can be set to mutate Hoverfly's state. 9 | 10 | .. toctree:: 11 | 12 | settingstate 13 | requiringstate 14 | managingstate 15 | sequences -------------------------------------------------------------------------------- /vendor/github.com/icrowley/fake/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | /vendor 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | .DS_Store 27 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go: -------------------------------------------------------------------------------- 1 | package leafnodes 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/types" 5 | ) 6 | 7 | type BasicNode interface { 8 | Type() types.SpecComponentType 9 | Run() (types.SpecState, types.SpecFailure) 10 | CodeLocation() types.CodeLocation 11 | } 12 | 13 | type SubjectNode interface { 14 | BasicNode 15 | 16 | Text() string 17 | Flag() types.FlagType 18 | Samples() int 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mathext/internal/gonum/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package gonum contains functions implemented by the gonum team. 6 | // It is here to avoid circular imports and/or double coding of functions. 7 | package gonum // import "gonum.org/v1/gonum/mathext/internal/gonum" 8 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/response_writer_pusher.go: -------------------------------------------------------------------------------- 1 | //+build go1.8 2 | 3 | package negroni 4 | 5 | import ( 6 | "fmt" 7 | "net/http" 8 | ) 9 | 10 | func (rw *responseWriter) Push(target string, opts *http.PushOptions) error { 11 | pusher, ok := rw.ResponseWriter.(http.Pusher) 12 | if ok { 13 | return pusher.Push(target, opts) 14 | } 15 | return fmt.Errorf("the ResponseWriter doesn't support the Pusher interface") 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/.editorconfig: -------------------------------------------------------------------------------- 1 | ; https://editorconfig.org/ 2 | 3 | root = true 4 | 5 | [*] 6 | insert_final_newline = true 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | indent_style = space 10 | indent_size = 2 11 | 12 | [{Makefile,go.mod,go.sum,*.go,.gitmodules}] 13 | indent_style = tab 14 | indent_size = 4 15 | 16 | [*.md] 17 | indent_size = 4 18 | trim_trailing_whitespace = false 19 | 20 | eclint_indent_style = unset -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "build-{branch}-{build}" 2 | image: Visual Studio 2015 3 | clone_folder: c:\gopath\src\github.com\hashicorp\hcl 4 | environment: 5 | GOPATH: c:\gopath 6 | init: 7 | - git config --global core.autocrlf false 8 | install: 9 | - cmd: >- 10 | echo %Path% 11 | 12 | go version 13 | 14 | go env 15 | 16 | go get -t ./... 17 | 18 | build_script: 19 | - cmd: go test -v ./... 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/simplifiedchinese/all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package simplifiedchinese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{GB18030, GBK, HZGB2312} 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | *.coverprofile -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_loong64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // func get_cpucfg(reg uint32) uint32 8 | TEXT ·get_cpucfg(SB), NOSPLIT|NOFRAME, $0 9 | MOVW reg+0(FP), R5 10 | // CPUCFG R5, R4 = 0x00006ca4 11 | WORD $0x00006ca4 12 | MOVW R4, ret+8(FP) 13 | RET 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // AliasType is the type of an alias in AliasMap. 8 | type AliasType int8 9 | 10 | const ( 11 | Deprecated AliasType = iota 12 | Macro 13 | Legacy 14 | 15 | AliasTypeUnknown AliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /functional-tests/hoverctl/testdata/request-template.json: -------------------------------------------------------------------------------- 1 | {"data":[{"requestTemplate": {"path": "/path1", "method": "GET", "destination": "www.virtual.com"}, "response": {"status": 201, "encodedBody": false, "body": "body1", "headers": {"Header": ["value1"]}}}, {"requestTemplate": {"path": "/path2", "method": "GET", "destination": "www.virtual.com", "headers": {"Header": ["value2"]}}, "response": {"status": 202, "body": "body2", "headers": {"Header": ["value2"]}}}]} 2 | -------------------------------------------------------------------------------- /hoverctl/wrapper/cache.go: -------------------------------------------------------------------------------- 1 | package wrapper 2 | 3 | import ( 4 | "github.com/SpectoLabs/hoverfly/hoverctl/configuration" 5 | ) 6 | 7 | func FlushCache(target configuration.Target) error { 8 | response, err := doRequest(target, "DELETE", v2ApiCache, "", nil) 9 | if err != nil { 10 | return err 11 | } 12 | 13 | err = handleResponseError(response, "Could not flush cache") 14 | if err != nil { 15 | return err 16 | } 17 | 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 8 | JMP libc_sysctl(SB) 9 | 10 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 11 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) 12 | -------------------------------------------------------------------------------- /core/matching/matchers/xpath_match.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "github.com/SpectoLabs/hoverfly/core/util" 5 | ) 6 | 7 | var Xpath = "xpath" 8 | 9 | func XpathMatch(match interface{}, toMatch string) bool { 10 | matchString, ok := match.(string) 11 | if !ok { 12 | return false 13 | } 14 | 15 | results, err := util.XpathExecution(matchString, toMatch) 16 | if err != nil { 17 | return false 18 | } 19 | 20 | return results.Bool() 21 | } 22 | -------------------------------------------------------------------------------- /core/models/cached_response.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/SpectoLabs/raymond" 5 | ) 6 | 7 | type CachedResponse struct { 8 | Request RequestDetails 9 | MatchingPair *RequestMatcherResponsePair 10 | ClosestMiss *ClosestMiss 11 | ResponseStateTemplates map[string]*raymond.Template 12 | ResponseTemplate *raymond.Template 13 | ResponseHeadersTemplates map[string][]*raymond.Template 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 || ppc64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 128 10 | 11 | func initOptions() { 12 | options = []option{ 13 | {Name: "darn", Feature: &PPC64.HasDARN}, 14 | {Name: "scv", Feature: &PPC64.HasSCV}, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/scope.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | // An ECMA-262 ExecutionContext. 4 | type scope struct { 5 | lexical stasher 6 | variable stasher 7 | this *object 8 | outer *scope 9 | frame frame 10 | depth int 11 | eval bool 12 | } 13 | 14 | func newScope(lexical stasher, variable stasher, this *object) *scope { 15 | return &scope{ 16 | lexical: lexical, 17 | variable: variable, 18 | this: this, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/auxv_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Auxv() ([][2]uintptr, error) { 12 | return nil, syscall.ENOTSUP 13 | } 14 | -------------------------------------------------------------------------------- /core/handlers/v2/postserveactiondetails_views.go: -------------------------------------------------------------------------------- 1 | package v2 2 | 3 | type PostServeActionDetailsView struct { 4 | Actions []ActionView `json:"actions,omitempty"` 5 | } 6 | 7 | type ActionView struct { 8 | ActionName string `json:"actionName,omitempty"` 9 | Binary string `json:"binary,omitempty"` 10 | ScriptContent string `json:"script,omitempty"` 11 | Remote string `json:"remote,omitempty"` 12 | DelayInMs int `json:"delayInMs,omitempty"` 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/mask_safe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of 2 | // this source code is governed by a BSD-style license that can be found in the 3 | // LICENSE file. 4 | 5 | //go:build appengine 6 | // +build appengine 7 | 8 | package websocket 9 | 10 | func maskBytes(key [4]byte, pos int, b []byte) int { 11 | for i := range b { 12 | b[i] ^= key[pos&3] 13 | pos++ 14 | } 15 | return pos & 3 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/attributes_slice.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "encoding/xml" 5 | "strings" 6 | ) 7 | 8 | type attributesSlice []xml.Attr 9 | 10 | func (attrs attributesSlice) Len() int { return len(attrs) } 11 | func (attrs attributesSlice) Less(i, j int) bool { 12 | return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1 13 | } 14 | func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] } 15 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.3" 5 | - "1.4" 6 | - "1.5" 7 | - "1.6" 8 | - "1.7" 9 | - "1.8" 10 | - "1.9" 11 | - "1.10" 12 | - "1.11" 13 | - "1.12" 14 | - "1.13" 15 | - "1.14" 16 | - "1.15" 17 | 18 | script: 19 | - ./validate.sh 20 | 21 | # this should give us faster builds according to 22 | # http://docs.travis-ci.com/user/migrating-from-legacy/ 23 | sudo: false 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package cpu 8 | 9 | // IsBigEndian records whether the GOARCH's byte order is big endian. 10 | const IsBigEndian = true 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/pwd_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package plan9 6 | 7 | import "syscall" 8 | 9 | func fixwd() { 10 | syscall.Fixwd() 11 | } 12 | 13 | func Getwd() (wd string, err error) { 14 | return syscall.Getwd() 15 | } 16 | 17 | func Chdir(path string) error { 18 | return syscall.Chdir(path) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /docs/mermaid/modify.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant Client application 3 | participant Hoverfly 4 | participant External service 5 | loop http 6 | Client application -->> Hoverfly: request 7 | note over Hoverfly: change_req.py 8 | Hoverfly -->> External service: request 9 | External service -->> Hoverfly: response 10 | note over Hoverfly: change_req.py 11 | Hoverfly -->> Client application: response 12 | end -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.21 6 | 7 | package cpu 8 | 9 | import ( 10 | _ "unsafe" // for linkname 11 | ) 12 | 13 | //go:linkname runtime_getAuxv runtime.getAuxv 14 | func runtime_getAuxv() []uintptr 15 | 16 | func init() { 17 | getAuxvFn = runtime_getAuxv 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package uuid generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security 8 | // Services. 9 | // 10 | // A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to 11 | // maps or compared directly. 12 | package uuid 13 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/global/init.go: -------------------------------------------------------------------------------- 1 | package global 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/onsi/ginkgo/internal/failer" 7 | "github.com/onsi/ginkgo/internal/suite" 8 | ) 9 | 10 | const DefaultTimeout = time.Duration(1 * time.Second) 11 | 12 | var Suite *suite.Suite 13 | var Failer *failer.Failer 14 | 15 | func init() { 16 | InitializeGlobals() 17 | } 18 | 19 | func InitializeGlobals() { 20 | Failer = failer.New() 21 | Suite = suite.New(Failer) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/slice.go: -------------------------------------------------------------------------------- 1 | package gofakeit 2 | 3 | import ( 4 | "reflect" 5 | ) 6 | 7 | // Slice fills built-in types and exported fields of a struct with random data. 8 | func Slice(v any) { sliceFunc(globalFaker, v) } 9 | 10 | // Slice fills built-in types and exported fields of a struct with random data. 11 | func (f *Faker) Slice(v any) { sliceFunc(f, v) } 12 | 13 | func sliceFunc(f *Faker, v any) { 14 | r(f, reflect.TypeOf(v), reflect.ValueOf(v), "", -1) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/floats/README.md: -------------------------------------------------------------------------------- 1 | # Gonum floats 2 | 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/floats)](https://pkg.go.dev/gonum.org/v1/gonum/floats) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/floats?status.svg)](https://godocs.io/gonum.org/v1/gonum/floats) 5 | 6 | Package floats provides a set of helper routines for dealing with slices of float64. 7 | The functions avoid allocations to allow for use within tight loops without garbage collection overhead. 8 | -------------------------------------------------------------------------------- /hoverctl/wrapper/pac.go: -------------------------------------------------------------------------------- 1 | package wrapper 2 | 3 | import ( 4 | "github.com/SpectoLabs/hoverfly/hoverctl/configuration" 5 | ) 6 | 7 | func SetPACFile(target configuration.Target) error { 8 | response, err := doRequest(target, "PUT", v2ApiPac, target.PACFile, nil) 9 | if err != nil { 10 | return err 11 | } 12 | 13 | defer response.Body.Close() 14 | 15 | err = handleResponseError(response, "Could not set PAC file") 16 | if err != nil { 17 | return err 18 | } 19 | 20 | return nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/icrowley/fake/Makefile: -------------------------------------------------------------------------------- 1 | .DEFAULT_GOAL = all 2 | 3 | name := fake 4 | package := github.com/icrowley/$(name) 5 | 6 | .PHONY: all 7 | all: 8 | 9 | .PHONY: test 10 | test: 11 | go test -v ./... 12 | 13 | .PHONY: bench 14 | bench:: dependencies 15 | go test \ 16 | -bench=. -v \ 17 | $(shell glide novendor) 18 | 19 | .PHONY: lint 20 | lint: 21 | golangci-lint --color=always --timeout=120s run ./... 22 | 23 | .PHONY: check 24 | check: lint test 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/runtime_auxv.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | // getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init) 8 | // on platforms that use auxv. 9 | var getAuxvFn func() []uintptr 10 | 11 | func getAuxv() []uintptr { 12 | if getAuxvFn == nil { 13 | return nil 14 | } 15 | return getAuxvFn() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dlapy2.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gonum 6 | 7 | import "math" 8 | 9 | // Dlapy2 is the LAPACK version of math.Hypot. 10 | // 11 | // Dlapy2 is an internal routine. It is exported for testing purposes. 12 | func (Implementation) Dlapy2(x, y float64) float64 { 13 | return math.Hypot(x, y) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mat/consts.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2016 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package mat 6 | 7 | // TriKind represents the triangularity of the matrix. 8 | type TriKind bool 9 | 10 | const ( 11 | // Upper specifies an upper triangular matrix. 12 | Upper TriKind = true 13 | // Lower specifies a lower triangular matrix. 14 | Lower TriKind = false 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/data/computer.go: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | // Computer consists of computer information 4 | var Computer = map[string][]string{ 5 | "linux_processor": {"i686", "x86_64"}, 6 | "mac_processor": {"Intel", "PPC", "U; Intel", "U; PPC"}, 7 | "windows_platform": {"Windows NT 6.2", "Windows NT 6.1", "Windows NT 6.0", "Windows NT 5.2", "Windows NT 5.1", "Windows NT 5.01", "Windows NT 5.0", "Windows NT 4.0", "Windows 98; Win 9x 4.90", "Windows 98", "Windows 95", "Windows CE"}, 8 | } 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/simulations/meta.rst: -------------------------------------------------------------------------------- 1 | .. _meta: 2 | 3 | Meta 4 | ==== 5 | 6 | The last part of the simulation schema is the meta object. Its purpose is to store metadata that is relevant to your simulation. This includes the simulation schema version, the version of Hoverfly used to export the simulation and the date and time at which the simulation was exported. 7 | 8 | .. literalinclude:: ../../simulations/basic-simulation.json 9 | :lines: 62-66 10 | :linenos: 11 | :language: javascript 12 | -------------------------------------------------------------------------------- /vendor/github.com/beevik/etree/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Brett Vickers (beevik) 2 | Felix Geisendörfer (felixge) 3 | Kamil Kisiel (kisielk) 4 | Graham King (grahamking) 5 | Matt Smith (ma314smith) 6 | Michal Jemala (michaljemala) 7 | Nicolas Piganeau (npiganeau) 8 | Chris Brown (ccbrown) 9 | Earncef Sequeira (earncef) 10 | Gabriel de Labachelerie (wuzuf) 11 | Martin Dosch (mdosch) 12 | Hugo Wetterberg (hugowetterberg) 13 | Tobias Theel (nerzal) 14 | Daniel Potapov (dpotapov) 15 | Mikhail Ferapontow (MikhailFerapontow) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm 6 | 7 | package cpu 8 | 9 | // IsBigEndian records whether the GOARCH's byte order is big endian. 10 | const IsBigEndian = false 11 | -------------------------------------------------------------------------------- /core/util/hashset.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | type HashSet map[interface{}]struct{} 4 | 5 | func NewHashSet() HashSet { 6 | return make(HashSet) 7 | } 8 | 9 | func (set HashSet) Add(item interface{}) { 10 | set[item] = struct{}{} 11 | } 12 | 13 | func (set HashSet) Remove(item interface{}) { 14 | delete(set, item) 15 | } 16 | 17 | func (set HashSet) Contains(item interface{}) bool { 18 | _, found := set[item] 19 | return found 20 | } 21 | 22 | func (set HashSet) Size() int { 23 | return len(set) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func NewColorable(file *os.File) io.Writer { 11 | if file == nil { 12 | panic("nil passed instead of *os.File to NewColorable()") 13 | } 14 | 15 | return file 16 | } 17 | 18 | func NewColorableStdout() io.Writer { 19 | return os.Stdout 20 | } 21 | 22 | func NewColorableStderr() io.Writer { 23 | return os.Stderr 24 | } 25 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Hoverfly Docs 2 | These are the docs that are used for https://hoverfly.readthedocs.io 3 | 4 | ## Building locally 5 | 6 | ```shell script 7 | $ make html 8 | $ open _builds/html/index.html 9 | ``` 10 | 11 | ## Updating simulation examples 12 | 13 | ```shell script 14 | $ ./pages/simulations/update.sh 15 | ``` 16 | 17 | ## Pinning the dependencies 18 | 19 | Run the following command after all python dependencies are installed: 20 | 21 | ```shell script 22 | $ pip freeze > requirements.txt 23 | ``` 24 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/Makefile: -------------------------------------------------------------------------------- 1 | BRANCH=`git rev-parse --abbrev-ref HEAD` 2 | COMMIT=`git rev-parse --short HEAD` 3 | GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" 4 | 5 | default: build 6 | 7 | race: 8 | @go test -v -race -test.run="TestSimulate_(100op|1000op)" 9 | 10 | # go get github.com/kisielk/errcheck 11 | errcheck: 12 | @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/boltdb/bolt 13 | 14 | test: 15 | @go test -v -cover . 16 | @go test -v ./cmd/bolt 17 | 18 | .PHONY: fmt test 19 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/translations.go: -------------------------------------------------------------------------------- 1 | package validator 2 | 3 | import ut "github.com/go-playground/universal-translator" 4 | 5 | // TranslationFunc is the function type used to register or override 6 | // custom translations 7 | type TranslationFunc func(ut ut.Translator, fe FieldError) string 8 | 9 | // RegisterTranslationsFunc allows for registering of translations 10 | // for a 'ut.Translator' for use within the 'TranslationFunc' 11 | type RegisterTranslationsFunc func(ut ut.Translator) error 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/Makefile: -------------------------------------------------------------------------------- 1 | GOCMD=go 2 | 3 | linters-install: 4 | @golangci-lint --version >/dev/null 2>&1 || { \ 5 | echo "installing linting tools..."; \ 6 | curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v2.0.2; \ 7 | } 8 | 9 | lint: linters-install 10 | golangci-lint run 11 | 12 | test: 13 | $(GOCMD) test -cover -race ./... 14 | 15 | bench: 16 | $(GOCMD) test -run=NONE -bench=. -benchmem ./... 17 | 18 | .PHONY: test lint linters-install 19 | -------------------------------------------------------------------------------- /vendor/github.com/icrowley/fake/nix-cage.json: -------------------------------------------------------------------------------- 1 | { 2 | "mounts": { 3 | "rw": [ 4 | ".", "~/.emacs.d", 5 | ["./.cache", "~/.cache", "d"], 6 | ["./.config", "~/.config", "d"], 7 | ["./.local", "~/.local", "d"], 8 | ["$SSH_AUTH_SOCK", "$SSH_AUTH_SOCK"], 9 | "/run" 10 | ], 11 | "ro": [ 12 | "~/.ssh", 13 | "~/.gitconfig", 14 | "/" 15 | ], 16 | "dev": ["/dev"], 17 | "tmpfs": [ 18 | "/tmp", 19 | "/home", 20 | "~" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/Makefile: -------------------------------------------------------------------------------- 1 | GOCMD=GO111MODULE=on go 2 | 3 | linters-install: 4 | @golangci-lint --version >/dev/null 2>&1 || { \ 5 | echo "installing linting tools..."; \ 6 | curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.41.1; \ 7 | } 8 | 9 | lint: linters-install 10 | golangci-lint run 11 | 12 | test: 13 | $(GOCMD) test -cover -race ./... 14 | 15 | bench: 16 | $(GOCMD) test -bench=. -benchmem ./... 17 | 18 | .PHONY: test lint linters-install -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | bin 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | *.test 27 | *.out 28 | *.txt 29 | /**/*.DS_Store 30 | cover.html 31 | README.html 32 | .idea 33 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go: -------------------------------------------------------------------------------- 1 | package spec_iterator 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/onsi/ginkgo/internal/spec" 7 | ) 8 | 9 | var ErrClosed = errors.New("no more specs to run") 10 | 11 | type SpecIterator interface { 12 | Next() (*spec.Spec, error) 13 | NumberOfSpecsPriorToIteration() int 14 | NumberOfSpecsToProcessIfKnown() (int, bool) 15 | NumberOfSpecsThatWillBeRunIfKnown() (int, bool) 16 | } 17 | 18 | type Counter struct { 19 | Index int `json:"index"` 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !cmp_debug 6 | // +build !cmp_debug 7 | 8 | package diff 9 | 10 | var debug debugger 11 | 12 | type debugger struct{} 13 | 14 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { 15 | return f 16 | } 17 | func (debugger) Update() {} 18 | func (debugger) Finish() {} 19 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TCGETS 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build wasm 6 | 7 | package cpu 8 | 9 | // We're compiling the cpu package for an unknown (software-abstracted) CPU. 10 | // Make CacheLinePad an empty struct and hope that the usual struct alignment 11 | // rules are good enough. 12 | 13 | const cacheLineSize = 0 14 | 15 | func initOptions() {} 16 | 17 | func archInit() {} 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/message/catalog/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.9 6 | 7 | package catalog 8 | 9 | import "golang.org/x/text/internal/catmsg" 10 | 11 | // A Message holds a collection of translations for the same phrase that may 12 | // vary based on the values of substitution arguments. 13 | type Message = catmsg.Message 14 | 15 | type firstInSequence = catmsg.FirstOf 16 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/conj.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Copyright ©2017 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | package cmplx64 10 | 11 | // Conj returns the complex conjugate of x. 12 | func Conj(x complex64) complex64 { return complex(real(x), -imag(x)) } 13 | -------------------------------------------------------------------------------- /vendor/github.com/gabriel-vasile/mimetype/.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Github is obeying this ignore file by default. 2 | # Run this command on local to ignore formatting commits in `git blame` 3 | # git config blame.ignoreRevsFile .git-blame-ignore-revs 4 | 5 | # Added a new column to supported_mimes.md 6 | # The supported_mimes.md file was a nice way to find when a file format was 7 | # introduced. However, when I changed to add a new column in the table, the 8 | # whole git blame got poisoned for the file. 9 | eb497f9bc5d31c6eab2929a112051218670137ba 10 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl.go: -------------------------------------------------------------------------------- 1 | // Package hcl decodes HCL into usable Go structures. 2 | // 3 | // hcl input can come in either pure HCL format or JSON format. 4 | // It can be parsed into an AST, and then decoded into a structure, 5 | // or it can be decoded directly from a string into a structure. 6 | // 7 | // If you choose to parse HCL into a raw AST, the benefit is that you 8 | // can write custom visitor implementations to implement custom 9 | // semantic checks. By default, HCL does not perform any semantic 10 | // checks. 11 | package hcl 12 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/reporter.go: -------------------------------------------------------------------------------- 1 | package reporters 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/config" 5 | "github.com/onsi/ginkgo/types" 6 | ) 7 | 8 | type Reporter interface { 9 | SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) 10 | BeforeSuiteDidRun(setupSummary *types.SetupSummary) 11 | SpecWillRun(specSummary *types.SpecSummary) 12 | SpecDidComplete(specSummary *types.SpecSummary) 13 | AfterSuiteDidRun(setupSummary *types.SetupSummary) 14 | SpecSuiteDidEnd(summary *types.SuiteSummary) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/metrics.go: -------------------------------------------------------------------------------- 1 | // Go port of Coda Hale's Metrics library 2 | // 3 | // 4 | // 5 | // Coda Hale's original work: 6 | package metrics 7 | 8 | // UseNilMetrics is checked by the constructor functions for all of the 9 | // standard metrics. If it is true, the metric returned is a stub. 10 | // 11 | // This global kill-switch helps quantify the observer effect and makes 12 | // for less cluttered pprof profiles. 13 | var UseNilMetrics bool = false 14 | -------------------------------------------------------------------------------- /core/matching/matchers/json_path_match.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "github.com/SpectoLabs/hoverfly/core/util" 5 | ) 6 | 7 | var JsonPath = "jsonpath" 8 | 9 | func JsonPathMatch(match interface{}, toMatch string) bool { 10 | matchString, ok := match.(string) 11 | if !ok { 12 | return false 13 | } 14 | 15 | matchString = util.PrepareJsonPathQuery(matchString) 16 | returnedString, err := util.JsonPathExecution(matchString, toMatch) 17 | if err != nil || returnedString == matchString { 18 | return false 19 | } 20 | 21 | return true 22 | } 23 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/modes/simulate.rst: -------------------------------------------------------------------------------- 1 | .. _simulate_mode: 2 | 3 | Simulate mode 4 | ============= 5 | 6 | In this mode, Hoverfly uses its simulation data in order to simulate external APIs. Each time Hoverfly receives a request, 7 | rather than forwarding it on to the real API, it will respond instead. No network traffic will ever reach the real external API. 8 | 9 | .. figure:: simulate.mermaid.png 10 | 11 | The simulation can be produced automatically via by running Hoverfly in :ref:`capture_mode`, or created manually. See :ref:`simulations` for information. 12 | -------------------------------------------------------------------------------- /examples/middleware/README.md: -------------------------------------------------------------------------------- 1 | # middleware 2 | This directory contains middleware examples and instructions on getting you started using middleware. The middleware is grouped in sub-directories by functionality. Depending on the functional example, multiple implementations of the same functionality exist in different languages. 3 | 4 | More information regarding each middleware example is provided in the relevant sub-directories. 5 | 6 | To find out more, please check the documentation regarding [middleware](https://docs.hoverfly.io/en/latest/pages/keyconcepts/middleware.html). -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | ## Maintainers Guide 2 | 3 | ### Semantic Versioning 4 | Semantic versioning as defined [here](https://semver.org) must be strictly adhered to. 5 | 6 | ### External Dependencies 7 | Any new external dependencies MUST: 8 | - Have a compatible LICENSE present. 9 | - Be actively maintained. 10 | - Be approved by @go-playground/admins 11 | 12 | ### PR Merge Requirements 13 | - Up-to-date branch. 14 | - Passing tests and linting. 15 | - CODEOWNERS approval. 16 | - Tests that cover both the Happy and Unhappy paths. -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "os" 11 | "strconv" 12 | "syscall" 13 | ) 14 | 15 | func executable() (string, error) { 16 | f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text") 17 | if err != nil { 18 | return "", err 19 | } 20 | defer f.Close() 21 | return syscall.Fd2path(int(f.Fd())) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /docs/pages/bindings/java.rst: -------------------------------------------------------------------------------- 1 | .. _hoverfly_java: 2 | 3 | 4 | Hoverfly Java 5 | ============= 6 | 7 | - Strict or loose HTTP request matching based on URL, method, body and header combinations 8 | - Fluent and expressive DSL for easy generation of simulated APIs 9 | - Automatic marshalling of objects into JSON during request/response body generation 10 | - HTTPS automatically supported, no extra configuration required 11 | - Download via Maven or Gradle 12 | 13 | To get started, read the `Hoverfly Java documentation `_. 14 | -------------------------------------------------------------------------------- /vendor/github.com/icrowley/fake/personal.go: -------------------------------------------------------------------------------- 1 | package fake 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // Gender generates random gender 8 | func Gender() string { 9 | return lookup(lang, "genders", true) 10 | } 11 | 12 | // GenderAbbrev returns first downcased letter of the random gender 13 | func GenderAbbrev() string { 14 | g := Gender() 15 | if g != "" { 16 | return strings.ToLower(string(g[0])) 17 | } 18 | return "" 19 | } 20 | 21 | // Language generates random human language 22 | func Language() string { 23 | return lookup(lang, "languages", true) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/tail_posix.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 | // +build !windows 3 | 4 | package tail 5 | 6 | import ( 7 | "os" 8 | ) 9 | 10 | // Deprecated: this function is only useful internally and, as such, 11 | // it will be removed from the API in a future major release. 12 | // 13 | // OpenFile proxies a os.Open call for a file so it can be correctly tailed 14 | // on POSIX and non-POSIX OSes like MS Windows. 15 | func OpenFile(name string) (file *os.File, err error) { 16 | return os.Open(name) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/tdewolff/minify/v2/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use this image to build the executable 2 | FROM golang:1.24-alpine AS build 3 | 4 | WORKDIR /go/src/github.com/tdewolff/minify 5 | COPY . /go/src/github.com/tdewolff/minify/ 6 | 7 | RUN apk add --no-cache git ca-certificates make bash 8 | RUN /usr/bin/env bash -c make install 9 | 10 | 11 | # Final image containing the executable from the previous step 12 | FROM alpine:3 13 | 14 | COPY --from=build /go/bin/minify /usr/bin/minify 15 | COPY "containerfiles/container-entrypoint.sh" "/init.sh" 16 | 17 | ENTRYPOINT ["/init.sh"] 18 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | dist: trusty 5 | 6 | go: 7 | - 1.x 8 | - 1.2.x 9 | - 1.3.x 10 | - 1.4.x 11 | - 1.5.x 12 | - 1.6.x 13 | - 1.7.x 14 | - 1.8.x 15 | - master 16 | 17 | before_install: 18 | - find "${GOPATH%%:*}" -name '*.a' -delete 19 | - rm -rf "${GOPATH%%:*}/src/golang.org" 20 | - go get golang.org/x/tools/cover 21 | - go get golang.org/x/tools/cmd/cover 22 | 23 | script: 24 | - go test -race -coverprofile=coverage.txt -covermode=atomic 25 | 26 | after_success: 27 | - bash <(curl -s "https://codecov.io/bash") 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/node_js.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build js 6 | 7 | package uuid 8 | 9 | // getHardwareInterface returns nil values for the JS version of the code. 10 | // This removes the "net" dependency, because it is not used in the browser. 11 | // Using the "net" library inflates the size of the transpiled JS code by 673k bytes. 12 | func getHardwareInterface(name string) (string, []byte) { return "", nil } 13 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The uuid package generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security 8 | // Services. 9 | // 10 | // This package is a partial wrapper around the github.com/google/uuid package. 11 | // This package represents a UUID as []byte while github.com/google/uuid 12 | // represents a UUID as [16]byte. 13 | package uuid 14 | -------------------------------------------------------------------------------- /docs/pages/keyconcepts/state/managingstate.rst: -------------------------------------------------------------------------------- 1 | .. _managingstate: 2 | 3 | 4 | Managing state via Hoverctl 5 | =========================== 6 | 7 | It could be tricky to reason about the current state of Hoverfly, or to get Hoverfly in a state that you desire for testing. 8 | This is why Hoverctl comes with commands that let you orchestrate it's state. Some useful commands are: 9 | 10 | .. code:: bash 11 | 12 | $ hoverctl state --help 13 | $ hoverctl state get-all 14 | $ hoverctl state get key 15 | $ hoverctl state set key value 16 | $ hoverctl state delete-all 17 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang 2 | 3 | RUN mkdir -p $GOPATH/src/github.com/nxadm/tail/ 4 | ADD . $GOPATH/src/github.com/nxadm/tail/ 5 | 6 | # expecting to fetch dependencies successfully. 7 | RUN go get -v github.com/nxadm/tail 8 | 9 | # expecting to run the test successfully. 10 | RUN go test -v github.com/nxadm/tail 11 | 12 | # expecting to install successfully 13 | RUN go install -v github.com/nxadm/tail 14 | RUN go install -v github.com/nxadm/tail/cmd/gotail 15 | 16 | RUN $GOPATH/bin/gotail -h || true 17 | 18 | ENV PATH $GOPATH/bin:$PATH 19 | CMD ["gotail"] 20 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | //go:build appengine || js || nacl || wasm 2 | // +build appengine js nacl wasm 3 | 4 | package isatty 5 | 6 | // IsTerminal returns true if the file descriptor is terminal which 7 | // is always false on js and appengine classic which is a sandboxed PaaS. 8 | func IsTerminal(fd uintptr) bool { 9 | return false 10 | } 11 | 12 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 13 | // terminal. This is also always false on this environment. 14 | func IsCygwinTerminal(fd uintptr) bool { 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/floats/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package floats provides a set of helper routines for dealing with slices 6 | // of float64. The functions avoid allocations to allow for use within tight 7 | // loops without garbage collection overhead. 8 | // 9 | // The convention used is that when a slice is being modified in place, it has 10 | // the name dst. 11 | package floats // import "gonum.org/v1/gonum/floats" 12 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 12 | var procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 13 | 14 | // IsTerminal return true if the file descriptor is terminal. 15 | func IsTerminal(fd uintptr) bool { 16 | var st uint32 17 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) 18 | return r != 0 && e == 0 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build plan9 && !race 6 | 7 | package plan9 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic/basic.rst: -------------------------------------------------------------------------------- 1 | .. _basic_tutorials: 2 | 3 | Basic tutorials 4 | =============== 5 | 6 | .. toctree:: 7 | :maxdepth: 3 8 | 9 | exportingsimulations/exportingsimulations 10 | importingsimulations/importingsimulations 11 | delays/addingdelays 12 | loosematching/loosematching 13 | randomlatency/randomlatency 14 | modifyingresponses/modifyingresponses 15 | https/https 16 | asawebserver/asawebserver 17 | cors/enablecors 18 | specificurls/specificurls 19 | capturingsequences/capturingsequences 20 | postserveaction/postserveaction 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gc 6 | 7 | package cpu 8 | 9 | // cpuid is implemented in cpu_gc_x86.s for gc compiler 10 | // and in cpu_gccgo.c for gccgo. 11 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 12 | 13 | // xgetbv with ecx = 0 is implemented in cpu_gc_x86.s for gc compiler 14 | // and in cpu_gccgo.c for gccgo. 15 | func xgetbv() (eax, edx uint32) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/abs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Copyright ©2017 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | package cmplx64 10 | 11 | import math "gonum.org/v1/gonum/internal/math32" 12 | 13 | // Abs returns the absolute value (also called the modulus) of x. 14 | func Abs(x complex64) float32 { return math.Hypot(real(x), imag(x)) } 15 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/scim/schema/type.go: -------------------------------------------------------------------------------- 1 | package scimschema 2 | 3 | type Type int 4 | 5 | const ( 6 | Unsupported Type = iota 7 | Schemas 8 | API 9 | Param 10 | ) 11 | 12 | func (t Type) String() string { 13 | switch t { 14 | case Schemas: 15 | return "schemas" 16 | case API: 17 | return "api" 18 | case Param: 19 | return "param" 20 | } 21 | 22 | return "" 23 | } 24 | 25 | func TypeFromString(input string) Type { 26 | switch input { 27 | case "schemas": 28 | return Schemas 29 | case "api": 30 | return API 31 | case "param": 32 | return Param 33 | } 34 | 35 | return Unsupported 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | //go:build (linux || aix || zos) && !appengine 2 | // +build linux aix zos 3 | // +build !appengine 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/pkg/twcache/cache.go: -------------------------------------------------------------------------------- 1 | package twcache 2 | 3 | // Cache defines a generic interface for a key-value storage with type constraints on keys and values. 4 | // The keys must be of a type that supports comparison. 5 | // Add inserts a new key-value pair, potentially evicting an item if necessary. 6 | // Get retrieves a value associated with the given key, returning a boolean to indicate if the key was found. 7 | // Purge clears all items from the cache. 8 | type Cache[K comparable, V any] interface { 9 | Add(key K, value V) (evicted bool) 10 | Get(key K) (value V, ok bool) 11 | Purge() 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/value_primitive.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | func toNumberPrimitive(value Value) Value { 4 | return toPrimitive(value, defaultValueHintNumber) 5 | } 6 | 7 | func toPrimitiveValue(value Value) Value { 8 | return toPrimitive(value, defaultValueNoHint) 9 | } 10 | 11 | func toPrimitive(value Value, hint defaultValueHint) Value { 12 | switch value.kind { 13 | case valueNull, valueUndefined, valueNumber, valueString, valueBoolean: 14 | return value 15 | case valueObject: 16 | return value.object().DefaultValue(hint) 17 | default: 18 | panic(hereBeDragons(value.kind, value)) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/go.yaml.in/yaml/v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !noasm && !gccgo && !safe 6 | // +build !noasm,!gccgo,!safe 7 | 8 | package f32 9 | 10 | // Ger performs the rank-one operation 11 | // 12 | // A += alpha * x * yᵀ 13 | // 14 | // where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. 15 | func Ger(m, n uintptr, alpha float32, 16 | x []float32, incX uintptr, 17 | y []float32, incY uintptr, 18 | a []float32, lda uintptr) 19 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/tail_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 | // +build windows 3 | 4 | package tail 5 | 6 | import ( 7 | "os" 8 | 9 | "github.com/nxadm/tail/winfile" 10 | ) 11 | 12 | // Deprecated: this function is only useful internally and, as such, 13 | // it will be removed from the API in a future major release. 14 | // 15 | // OpenFile proxies a os.Open call for a file so it can be correctly tailed 16 | // on POSIX and non-POSIX OSes like MS Windows. 17 | func OpenFile(name string) (file *os.File, err error) { 18 | return winfile.OpenFile(name, os.O_RDONLY, 0) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.13.1 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | 18 | # Only clone the most recent commit. 19 | git: 20 | depth: 1 21 | 22 | script: 23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 24 | 25 | after_success: | 26 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 2 | // +build plan9 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | path, err := syscall.Fd2path(int(fd)) 13 | if err != nil { 14 | return false 15 | } 16 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /core/matching/state_matcher.go: -------------------------------------------------------------------------------- 1 | package matching 2 | 3 | func StateMatcher(copyState map[string]string, requiredState map[string]string) *FieldMatch { 4 | 5 | score := 0 6 | matched := true 7 | 8 | if requiredState == nil || len(requiredState) == 0 { 9 | return &FieldMatch{ 10 | Matched: true, 11 | Score: 0, 12 | } 13 | } 14 | 15 | for key, value := range requiredState { 16 | if _, ok := copyState[key]; !ok { 17 | matched = false 18 | } 19 | if copyState[key] != value { 20 | matched = false 21 | } else { 22 | score++ 23 | } 24 | } 25 | 26 | return &FieldMatch{ 27 | Matched: matched, 28 | Score: score, 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/sys/windows" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | handle := windows.Handle(v.Fd()) 16 | var mode uint32 17 | if err := windows.GetConsoleMode(handle, &mode); err != nil { 18 | return false 19 | } 20 | mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING 21 | if err := windows.SetConsoleMode(handle, mode); err != nil { 22 | return false 23 | } 24 | return true 25 | } 26 | return false 27 | } 28 | -------------------------------------------------------------------------------- /examples/middleware/aws_lambda/aws_lambda.py: -------------------------------------------------------------------------------- 1 | from time import sleep 2 | from random import randint 3 | 4 | def lambda_handler(event, context): 5 | sleep(randint(0,2)) 6 | 7 | event['response'] = {} 8 | event['response']['status'] = 503 9 | event['response']['body'] = "PGh0bWw+DQo8aGVhZD48dGl0bGU+NTAwIEludGVybmFsIFNlcnZlciBFcnJvcjwvdGl0bGU+PC9oZWFkPg0KPGJvZHkgYmdjb2xvcj0id2hpdGUiPg0KPGNlbnRlcj48aDE+NTAwIEludGVybmFsIFNlcnZlciBFcnJvcjwvaDE+PC9jZW50ZXI+DQo8aHI+PGNlbnRlcj5uZ2lueC8xLjYuMjwvY2VudGVyPg0KPC9ib2R5Pg0KPC9odG1sPg==" 10 | event['response']['encodedBody'] = True 11 | event['response']['headers'] = {} 12 | 13 | 14 | return event 15 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_openbsd.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | const ( 9 | msAsync = 1 << iota // perform asynchronous writes 10 | msSync // perform synchronous writes 11 | msInvalidate // invalidate cached data 12 | ) 13 | 14 | func msync(db *DB) error { 15 | _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate) 16 | if errno != 0 { 17 | return errno 18 | } 19 | return nil 20 | } 21 | 22 | func fdatasync(db *DB) error { 23 | if db.data != nil { 24 | return msync(db) 25 | } 26 | return db.file.Sync() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/README.md: -------------------------------------------------------------------------------- 1 | # Go terminal/console support 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) 4 | 5 | This repository provides Go terminal and console support packages. 6 | 7 | ## Report Issues / Send Patches 8 | 9 | This repository uses Gerrit for code changes. To learn how to submit changes to 10 | this repository, see https://go.dev/doc/contribute. 11 | 12 | The git repository is https://go.googlesource.com/term. 13 | 14 | The main issue tracker for the term repository is located at 15 | https://go.dev/issues. Prefix your issue with "x/term:" in the 16 | subject line, so it is easy to find. 17 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/types/synchronization.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | type RemoteBeforeSuiteState int 8 | 9 | const ( 10 | RemoteBeforeSuiteStateInvalid RemoteBeforeSuiteState = iota 11 | 12 | RemoteBeforeSuiteStatePending 13 | RemoteBeforeSuiteStatePassed 14 | RemoteBeforeSuiteStateFailed 15 | RemoteBeforeSuiteStateDisappeared 16 | ) 17 | 18 | type RemoteBeforeSuiteData struct { 19 | Data []byte 20 | State RemoteBeforeSuiteState 21 | } 22 | 23 | func (r RemoteBeforeSuiteData) ToJSON() []byte { 24 | data, _ := json.Marshal(r) 25 | return data 26 | } 27 | 28 | type RemoteAfterSuiteData struct { 29 | CanRun bool 30 | } 31 | -------------------------------------------------------------------------------- /docs/mermaid/exportingsimulations.mermaid: -------------------------------------------------------------------------------- 1 | sequenceDiagram 2 | participant Enduser 3 | participant Hoverctl 4 | participant Hoverfly 5 | participant Endpoint 6 | Enduser -->> Hoverctl: start in capture mode 7 | Hoverctl -->> Hoverfly: start in capture mode 8 | Enduser -->> Hoverfly: request (via proxy) 9 | Hoverfly -->> Endpoint: proxied request 10 | Endpoint -->> Hoverfly: response (via proxy) 11 | Hoverfly -->> Enduser: proxied response 12 | Enduser -->> Hoverctl: show logs 13 | Hoverctl -->> Enduser: prints logs 14 | Enduser -->> Hoverctl: export simulation 15 | Hoverctl -->> Enduser: exports simulation 16 | Enduser -->> Hoverctl: stop -------------------------------------------------------------------------------- /vendor/github.com/brianvoe/gofakeit/v6/data/README.md: -------------------------------------------------------------------------------- 1 | # Gofakeit Data 2 | 3 | Gofakeit data set 4 | 5 | ## List 6 | 7 | ```go 8 | List() 9 | ``` 10 | 11 | ## Get/Set/Remove Data 12 | 13 | ```go 14 | data.Get("desserts") 15 | 16 | data.Set("desserts", map[string][]string{ 17 | "cake": {"chocolate", "vanilla"}, 18 | "pie": {"apple", "pecan"}, 19 | "ice cream": {"strawberry", "vanilla"}, 20 | }) 21 | 22 | data.Remove("desserts") 23 | ``` 24 | 25 | ## Get/Set/Remove Sub Data 26 | 27 | ```go 28 | data.GetSubData("desserts", "cake") 29 | 30 | data.SetSub("desserts", "cake", []string{"chocolate", "vanilla"}) 31 | 32 | data.RemoveSub("desserts", "cake") 33 | ``` 34 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.cirrus.yml: -------------------------------------------------------------------------------- 1 | freebsd_task: 2 | name: 'FreeBSD' 3 | freebsd_instance: 4 | image_family: freebsd-14-2 5 | install_script: 6 | - pkg update -f 7 | - pkg install -y go 8 | test_script: 9 | # run tests as user "cirrus" instead of root 10 | - pw useradd cirrus -m 11 | - chown -R cirrus:cirrus . 12 | - FSNOTIFY_BUFFER=4096 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... 13 | - sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... 14 | - FSNOTIFY_DEBUG=1 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race -v ./... 15 | -------------------------------------------------------------------------------- /vendor/github.com/robertkrimen/otto/result.go: -------------------------------------------------------------------------------- 1 | package otto 2 | 3 | type resultKind int 4 | 5 | const ( 6 | _ resultKind = iota 7 | resultReturn 8 | resultBreak 9 | resultContinue 10 | ) 11 | 12 | type result struct { 13 | value Value 14 | target string 15 | kind resultKind 16 | } 17 | 18 | func newReturnResult(value Value) result { 19 | return result{kind: resultReturn, value: value, target: ""} 20 | } 21 | 22 | func newContinueResult(target string) result { 23 | return result{kind: resultContinue, value: emptyValue, target: target} 24 | } 25 | 26 | func newBreakResult(target string) result { 27 | return result{kind: resultBreak, value: emptyValue, target: target} 28 | } 29 | -------------------------------------------------------------------------------- /functional-tests/hoverctl/testdata/test.pac: -------------------------------------------------------------------------------- 1 | function FindProxyForURL(url, host) { 2 | // our local URLs from the domains below example.com don't need a proxy: 3 | if (shExpMatch(host, "*.example.com")) 4 | { 5 | return "DIRECT"; 6 | } 7 | 8 | // URLs within this network are accessed through 9 | // port 8080 on fastproxy.example.com: 10 | if (isInNet(host, "10.0.0.0", "255.255.248.0")) 11 | { 12 | return "PROXY fastproxy.example.com:8080"; 13 | } 14 | 15 | // All other requests go through port 8080 of proxy.example.com. 16 | // should that fail to respond, go directly to the WWW: 17 | return "PROXY proxy.example.com:8080; DIRECT"; 18 | } -------------------------------------------------------------------------------- /hoverctl/wrapper/wrapper_test.go: -------------------------------------------------------------------------------- 1 | package wrapper 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | hf "github.com/SpectoLabs/hoverfly/core" 8 | "github.com/SpectoLabs/hoverfly/hoverctl/configuration" 9 | ) 10 | 11 | var hoverfly *hf.Hoverfly 12 | 13 | var target = configuration.Target{ 14 | Host: "localhost", 15 | AdminPort: 8500, 16 | } 17 | 18 | var inaccessibleTarget = configuration.Target{ 19 | Host: "something", 20 | AdminPort: 1234, 21 | } 22 | 23 | func TestMain(m *testing.M) { 24 | hoverfly = hf.NewHoverfly() 25 | hoverfly.Cfg.Webserver = true 26 | hoverfly.StartProxy() 27 | 28 | returnCode := m.Run() 29 | hoverfly.StopProxy() 30 | os.Exit(returnCode) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /examples/postserveaction/simulation-with-callback.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "pairs": [ 4 | { 5 | "request": { 6 | "destination": [ 7 | { 8 | "matcher": "exact", 9 | "value": "helloworld-test.com" 10 | } 11 | ] 12 | }, 13 | "response": { 14 | "status": 200, 15 | "body": "Hello World", 16 | "encodedBody": false, 17 | "postServeAction": "outbound-http" 18 | } 19 | } 20 | ] 21 | }, 22 | "meta": { 23 | "schemaVersion": "v5.2", 24 | "hoverflyVersion": "v1.6.0", 25 | "timeExported": "2023-09-02T13:10:04+05:30" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/lex.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "unicode" 5 | "unicode/utf8" 6 | ) 7 | 8 | type lexModeValue byte 9 | 10 | const ( 11 | lexModeUnknown lexModeValue = iota 12 | lexModeHcl 13 | lexModeJson 14 | ) 15 | 16 | // lexMode returns whether we're going to be parsing in JSON 17 | // mode or HCL mode. 18 | func lexMode(v []byte) lexModeValue { 19 | var ( 20 | r rune 21 | w int 22 | offset int 23 | ) 24 | 25 | for { 26 | r, w = utf8.DecodeRune(v[offset:]) 27 | offset += w 28 | if unicode.IsSpace(r) { 29 | continue 30 | } 31 | if r == '{' { 32 | return lexModeJson 33 | } 34 | break 35 | } 36 | 37 | return lexModeHcl 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/urn8141.go: -------------------------------------------------------------------------------- 1 | package urn 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | ) 7 | 8 | const errInvalidURN8141 = "invalid URN per RFC 8141: %s" 9 | 10 | type URN8141 struct { 11 | *URN 12 | } 13 | 14 | func (u URN8141) MarshalJSON() ([]byte, error) { 15 | return json.Marshal(u.String()) 16 | } 17 | 18 | func (u *URN8141) UnmarshalJSON(bytes []byte) error { 19 | var str string 20 | if err := json.Unmarshal(bytes, &str); err != nil { 21 | return err 22 | } 23 | if value, ok := Parse([]byte(str), WithParsingMode(RFC8141Only)); !ok { 24 | return fmt.Errorf(errInvalidURN8141, str) 25 | } else { 26 | *u = URN8141{value} 27 | } 28 | 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine 2 | // +build darwin freebsd openbsd netbsd dragonfly hurd 3 | // +build !appengine 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | # Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore 23 | # swap 24 | [._]*.s[a-w][a-z] 25 | [._]s[a-w][a-z] 26 | # session 27 | Session.vim 28 | # temporary 29 | .netrwhist 30 | *~ 31 | # auto-generated tag files 32 | tags 33 | 34 | *.exe 35 | cobra.test 36 | bin 37 | 38 | .idea/ 39 | *.iml 40 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | alabaster==0.7.13 2 | apache-libcloud==3.7.0 3 | Babel==2.12.1 4 | cffi==1.15.1 5 | charset-normalizer==2.0.12 6 | docutils==0.16 7 | idna==3.7 8 | imagesize==1.4.1 9 | importlib-metadata==6.8.0 10 | Jinja2==3.1.6 11 | packaging==23.1 12 | pycparser==2.21 13 | Pygments==2.16.1 14 | requests==2.32.4 15 | six==1.16.0 16 | snowballstemmer==2.2.0 17 | Sphinx==5.3.0 18 | sphinx-rtd-theme==0.5.2 19 | sphinxcontrib-applehelp==1.0.7 20 | sphinxcontrib-devhelp==1.0.5 21 | sphinxcontrib-htmlhelp==2.0.4 22 | sphinxcontrib-jquery==4.1 23 | sphinxcontrib-jsmath==1.0.1 24 | sphinxcontrib-mermaid==0.9.2 25 | sphinxcontrib-qthelp==1.0.6 26 | sphinxcontrib-serializinghtml==1.1.9 27 | zipp==3.19.1 28 | 29 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.13.4 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | 18 | # Only clone the most recent commit. 19 | git: 20 | depth: 1 21 | 22 | script: 23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 24 | 25 | after_success: | 26 | [ $TRAVIS_GO_VERSION = 1.13.4 ] && 27 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN -------------------------------------------------------------------------------- /vendor/golang.org/x/text/message/catalog/gopre19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.9 6 | 7 | package catalog 8 | 9 | import "golang.org/x/text/internal/catmsg" 10 | 11 | // A Message holds a collection of translations for the same phrase that may 12 | // vary based on the values of substitution arguments. 13 | type Message interface { 14 | catmsg.Message 15 | } 16 | 17 | func firstInSequence(m []Message) catmsg.Message { 18 | a := []catmsg.Message{} 19 | for _, m := range m { 20 | a = append(a, m) 21 | } 22 | return catmsg.FirstOf(a) 23 | } 24 | --------------------------------------------------------------------------------